├── .gitignore ├── LICENSE ├── README.md ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts └── src │ └── main │ └── kotlin │ ├── Dependencies.kt │ ├── KotlinJs.kt │ ├── Publication.kt │ └── Versions.kt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── kotlin-antd ├── README.md ├── antd-samples │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── kotlin │ │ └── samples │ │ │ ├── App.kt │ │ │ ├── Main.kt │ │ │ ├── affix │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── OnChange.kt │ │ │ └── Target.kt │ │ │ ├── alert │ │ │ ├── App.kt │ │ │ ├── Banner.kt │ │ │ ├── Basic.kt │ │ │ ├── Closable.kt │ │ │ ├── CloseText.kt │ │ │ ├── CustomIcon.kt │ │ │ ├── Description.kt │ │ │ ├── ErrorBoundary.kt │ │ │ ├── Icon.kt │ │ │ ├── SmoothClosed.kt │ │ │ └── Style.kt │ │ │ ├── anchor │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── OnChange.kt │ │ │ ├── OnClick.kt │ │ │ ├── Static.kt │ │ │ └── TargetOffset.kt │ │ │ ├── autocomplete │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Custom.kt │ │ │ ├── NonCaseSensitive.kt │ │ │ └── Options.kt │ │ │ ├── avatar │ │ │ ├── App.kt │ │ │ ├── Badge.kt │ │ │ ├── Basic.kt │ │ │ ├── Dynamic.kt │ │ │ ├── Fallback.kt │ │ │ ├── Group.kt │ │ │ ├── Responsive.kt │ │ │ ├── ToggleDebug.kt │ │ │ └── Type.kt │ │ │ ├── backtop │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ └── Custom.kt │ │ │ ├── badge │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Change.kt │ │ │ ├── Colorful.kt │ │ │ ├── Dot.kt │ │ │ ├── Link.kt │ │ │ ├── NoWrapper.kt │ │ │ ├── Offset.kt │ │ │ ├── Overflow.kt │ │ │ ├── Ribbon.kt │ │ │ ├── Status.kt │ │ │ └── Ttitle.kt │ │ │ ├── breadcrumb │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Overlay.kt │ │ │ ├── Separator.kt │ │ │ ├── SeparatorIndepent.kt │ │ │ └── WithIcon.kt │ │ │ ├── button │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Block.kt │ │ │ ├── ButtonGroup.kt │ │ │ ├── Disabled.kt │ │ │ ├── Ghost.kt │ │ │ ├── Icon.kt │ │ │ ├── Loading.kt │ │ │ ├── Multiple.kt │ │ │ └── Size.kt │ │ │ ├── calendar │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Card.kt │ │ │ ├── CustomizeHeader.kt │ │ │ ├── NoticeCalendar.kt │ │ │ └── Select.kt │ │ │ ├── card │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── BorderLess.kt │ │ │ ├── FlexibleContent.kt │ │ │ ├── GridCard.kt │ │ │ ├── InColumn.kt │ │ │ ├── Inner.kt │ │ │ ├── Loading.kt │ │ │ ├── Meta.kt │ │ │ ├── Simple.kt │ │ │ └── Tabs.kt │ │ │ ├── carousel │ │ │ ├── App.kt │ │ │ ├── Autoplay.kt │ │ │ ├── Basic.kt │ │ │ ├── Fade.kt │ │ │ └── Position.kt │ │ │ ├── cascader │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── ChangeOnSelect.kt │ │ │ ├── CustomRender.kt │ │ │ ├── CustomTrigger.kt │ │ │ ├── DefaultValue.kt │ │ │ ├── DisabledOption.kt │ │ │ ├── FieldNames.kt │ │ │ ├── Hover.kt │ │ │ ├── Lazy.kt │ │ │ ├── Search.kt │ │ │ ├── Size.kt │ │ │ └── Suffix.kt │ │ │ ├── checkbox │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── CheckAll.kt │ │ │ ├── Controller.kt │ │ │ ├── Disabled.kt │ │ │ ├── Group.kt │ │ │ └── Layout.kt │ │ │ ├── collapse │ │ │ ├── Accordion.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Borderless.kt │ │ │ ├── Custom.kt │ │ │ ├── Extra.kt │ │ │ ├── Mix.kt │ │ │ └── Noarrow.kt │ │ │ ├── comment │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Editor.kt │ │ │ ├── List.kt │ │ │ └── Nested.kt │ │ │ ├── configprovider │ │ │ ├── App.kt │ │ │ ├── Direction.kt │ │ │ ├── Locale.kt │ │ │ └── Size.kt │ │ │ ├── datepicker │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── DateRender.kt │ │ │ ├── Disabled.kt │ │ │ ├── DisabledDate.kt │ │ │ ├── ExtraFooter.kt │ │ │ ├── Format.kt │ │ │ ├── Mode.kt │ │ │ ├── PresettedRanges.kt │ │ │ ├── Size.kt │ │ │ ├── StartEnd.kt │ │ │ ├── Suffix.kt │ │ │ └── Time.kt │ │ │ ├── descriptions │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Border.kt │ │ │ ├── Responsive.kt │ │ │ ├── Size.kt │ │ │ ├── Vertical.kt │ │ │ └── VerticalBorder.kt │ │ │ ├── divider │ │ │ ├── App.kt │ │ │ ├── CustomizeStyle.kt │ │ │ ├── Horizontal.kt │ │ │ ├── Plain.kt │ │ │ ├── Vertical.kt │ │ │ └── WithText.kt │ │ │ ├── drawer │ │ │ ├── App.kt │ │ │ ├── BasicRight.kt │ │ │ ├── MultiLevelDrawer.kt │ │ │ ├── Placement.kt │ │ │ └── UserProfile.kt │ │ │ ├── dropdown │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── ContextMenu.kt │ │ │ ├── DropdownButton.kt │ │ │ ├── Event.kt │ │ │ ├── Item.kt │ │ │ ├── OverlayVisible.kt │ │ │ ├── Placement.kt │ │ │ ├── SubMenu.kt │ │ │ └── Trigger.kt │ │ │ ├── empty │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── ConfigProvider.kt │ │ │ ├── Customize.kt │ │ │ └── Simple.kt │ │ │ ├── form │ │ │ ├── AdvancedSearch.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── ControlHooks.kt │ │ │ ├── ControlRef.kt │ │ │ ├── DynamicRule.kt │ │ │ ├── Layout.kt │ │ │ ├── NestMessages.kt │ │ │ ├── NormalLogin.kt │ │ │ ├── Register.kt │ │ │ ├── RequiredMark.kt │ │ │ ├── Size.kt │ │ │ ├── TimeRelatedControls.kt │ │ │ ├── ValidateOther.kt │ │ │ ├── ValidateStatic.kt │ │ │ └── WithoutFormCreate.kt │ │ │ ├── grid │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Flex.kt │ │ │ ├── FlexAlign.kt │ │ │ ├── FlexOrder.kt │ │ │ ├── Gutter.kt │ │ │ ├── Offset.kt │ │ │ ├── Playground.kt │ │ │ ├── Responsive.kt │ │ │ ├── ResponsiveMore.kt │ │ │ ├── Sort.kt │ │ │ └── UseBreakpoint.kt │ │ │ ├── icon │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Custom.kt │ │ │ ├── Iconfont.kt │ │ │ ├── ScriptUrl.kt │ │ │ └── TwoTone.kt │ │ │ ├── image │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Fallback.kt │ │ │ └── Placeholder.kt │ │ │ ├── input │ │ │ ├── Addon.kt │ │ │ ├── AllowClear.kt │ │ │ ├── App.kt │ │ │ ├── AutosizeTextarea.kt │ │ │ ├── Basic.kt │ │ │ ├── Group.kt │ │ │ ├── PasswordInput.kt │ │ │ ├── Presuffix.kt │ │ │ ├── SearchInput.kt │ │ │ ├── Size.kt │ │ │ ├── Textarea.kt │ │ │ └── TextareaResize.kt │ │ │ ├── inputnumber │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Digit.kt │ │ │ ├── Disabled.kt │ │ │ ├── Formatter.kt │ │ │ └── Size.kt │ │ │ ├── layout │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── CustomTrigger.kt │ │ │ ├── CustomTriggerDebug.kt │ │ │ ├── Fixed.kt │ │ │ ├── FixedSider.kt │ │ │ ├── Responsive.kt │ │ │ ├── Side.kt │ │ │ ├── Top.kt │ │ │ ├── TopSide.kt │ │ │ └── TopSide2.kt │ │ │ ├── list │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Grid.kt │ │ │ ├── LoadMore.kt │ │ │ ├── Responsive.kt │ │ │ └── Vertical.kt │ │ │ ├── localeprovider │ │ │ ├── All.kt │ │ │ ├── App.kt │ │ │ └── Basic.kt │ │ │ ├── mentions │ │ │ ├── App.kt │ │ │ ├── Async.kt │ │ │ ├── Basic.kt │ │ │ ├── Placement.kt │ │ │ ├── Prefix.kt │ │ │ └── Readonly.kt │ │ │ ├── menu │ │ │ ├── App.kt │ │ │ ├── Horizontal.kt │ │ │ ├── Inline.kt │ │ │ ├── InlineCollapsed.kt │ │ │ ├── SiderCurrent.kt │ │ │ ├── SwitchMode.kt │ │ │ ├── Theme.kt │ │ │ └── Vertical.kt │ │ │ ├── message │ │ │ ├── App.kt │ │ │ ├── Duration.kt │ │ │ ├── Hooks.kt │ │ │ ├── Info.kt │ │ │ ├── Loading.kt │ │ │ ├── Other.kt │ │ │ └── Thenable.kt │ │ │ ├── modal │ │ │ ├── App.kt │ │ │ ├── Async.kt │ │ │ ├── Basic.kt │ │ │ ├── ButtonProps.kt │ │ │ ├── Confirm.kt │ │ │ ├── ConfirmPromise.kt │ │ │ ├── ConfirmRouter.kt │ │ │ ├── Footer.kt │ │ │ ├── Hooks.kt │ │ │ ├── Info.kt │ │ │ ├── Locale.kt │ │ │ ├── Manual.kt │ │ │ └── Position.kt │ │ │ ├── notification │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── CustomIcon.kt │ │ │ ├── CustomStyle.kt │ │ │ ├── Duration.kt │ │ │ ├── Hooks.kt │ │ │ ├── Placement.kt │ │ │ ├── Update.kt │ │ │ ├── WithBtn.kt │ │ │ └── WithIcon.kt │ │ │ ├── pageheader │ │ │ ├── Actions.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Breadcrumb.kt │ │ │ ├── Content.kt │ │ │ └── Ghost.kt │ │ │ ├── pagination │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Changer.kt │ │ │ ├── Controlled.kt │ │ │ ├── ItemRender.kt │ │ │ ├── Jump.kt │ │ │ ├── Mini.kt │ │ │ ├── More.kt │ │ │ ├── Simple.kt │ │ │ └── Total.kt │ │ │ ├── popconfirm │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── DynamicTrigger.kt │ │ │ ├── Icon.kt │ │ │ ├── Locale.kt │ │ │ └── Placement.kt │ │ │ ├── popover │ │ │ ├── App.kt │ │ │ ├── ArrowPointAtCenter.kt │ │ │ ├── Basic.kt │ │ │ ├── Control.kt │ │ │ ├── HoverWithClick.kt │ │ │ ├── Placement.kt │ │ │ └── TriggerType.kt │ │ │ ├── progress │ │ │ ├── App.kt │ │ │ ├── Circle.kt │ │ │ ├── CircleDynamic.kt │ │ │ ├── CircleMini.kt │ │ │ ├── Dashboard.kt │ │ │ ├── Dynamic.kt │ │ │ ├── Format.kt │ │ │ ├── GradientLine.kt │ │ │ ├── Line.kt │ │ │ ├── LineMini.kt │ │ │ ├── Linecap.kt │ │ │ ├── Segment.kt │ │ │ └── Steps.kt │ │ │ ├── radio │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Disabled.kt │ │ │ ├── RadioButton.kt │ │ │ ├── RadioButtonSolid.kt │ │ │ ├── RadioGroup.kt │ │ │ ├── RadioGroupMore.kt │ │ │ ├── RadioGroupOptions.kt │ │ │ ├── RadioGroupWithName.kt │ │ │ └── Size.kt │ │ │ ├── rate │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Character.kt │ │ │ ├── Clear.kt │ │ │ ├── Disabled.kt │ │ │ ├── Half.kt │ │ │ └── Text.kt │ │ │ ├── result │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ └── CustomIcon.kt │ │ │ ├── select │ │ │ ├── App.kt │ │ │ ├── AutomaticTokenization.kt │ │ │ ├── Basic.kt │ │ │ ├── Bordered.kt │ │ │ ├── Coordinate.kt │ │ │ ├── CustomDropdownMenu.kt │ │ │ ├── CustomTagRender.kt │ │ │ ├── HideSelected.kt │ │ │ ├── LabelInValue.kt │ │ │ ├── Multiple.kt │ │ │ ├── OptGroup.kt │ │ │ ├── OptionLabelProp.kt │ │ │ ├── Search.kt │ │ │ ├── SelectUsers.kt │ │ │ ├── Size.kt │ │ │ ├── Suffix.kt │ │ │ └── Tags.kt │ │ │ ├── skeleton │ │ │ ├── Active.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Children.kt │ │ │ ├── Complex.kt │ │ │ ├── Element.kt │ │ │ └── List.kt │ │ │ ├── slider │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Event.kt │ │ │ ├── IconSlider.kt │ │ │ ├── InputNumber.kt │ │ │ ├── Mark.kt │ │ │ ├── ShowTooltip.kt │ │ │ ├── TipFormatter.kt │ │ │ └── Vertical.kt │ │ │ ├── space │ │ │ ├── Align.kt │ │ │ ├── App.kt │ │ │ ├── Base.kt │ │ │ ├── Customize.kt │ │ │ ├── Size.kt │ │ │ ├── Split.kt │ │ │ └── Vertical.kt │ │ │ ├── spin │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── CustomIndicator.kt │ │ │ ├── DelayAndDebounce.kt │ │ │ ├── Inside.kt │ │ │ ├── Nested.kt │ │ │ ├── Size.kt │ │ │ └── Tip.kt │ │ │ ├── statistic │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Card.kt │ │ │ ├── Countdown.kt │ │ │ └── Unit.kt │ │ │ ├── steps │ │ │ ├── App.kt │ │ │ ├── Clickable.kt │ │ │ ├── CustomizedProgressDot.kt │ │ │ ├── Error.kt │ │ │ ├── Icon.kt │ │ │ ├── ProgressDot.kt │ │ │ ├── Simple.kt │ │ │ ├── SmallSize.kt │ │ │ ├── StepNext.kt │ │ │ ├── Vertical.kt │ │ │ └── VerticalSmall.kt │ │ │ ├── switch │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Disabled.kt │ │ │ ├── Loading.kt │ │ │ ├── Size.kt │ │ │ └── Text.kt │ │ │ ├── table │ │ │ ├── Ajax.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Bordered.kt │ │ │ ├── ColspanRowspan.kt │ │ │ ├── DynamicSettings.kt │ │ │ ├── Expand.kt │ │ │ ├── ExpandChildren.kt │ │ │ ├── FixedColumns.kt │ │ │ ├── FixedColumnsHeader.kt │ │ │ ├── FixedHeader.kt │ │ │ ├── GroupingColumns.kt │ │ │ ├── Head.kt │ │ │ ├── Jsx.kt │ │ │ ├── NestedTable.kt │ │ │ ├── ResetFilter.kt │ │ │ ├── RowSelection.kt │ │ │ ├── RowSelectionAndOperation.kt │ │ │ ├── RowSelectionCustom.kt │ │ │ ├── Size.kt │ │ │ ├── Sticky.kt │ │ │ └── Summary.kt │ │ │ ├── tabs │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Card.kt │ │ │ ├── CardTop.kt │ │ │ ├── CustomAddTrigger.kt │ │ │ ├── Disabled.kt │ │ │ ├── EditableCard.kt │ │ │ ├── Extra.kt │ │ │ ├── Icon.kt │ │ │ ├── Nest.kt │ │ │ ├── Position.kt │ │ │ ├── Size.kt │ │ │ └── Slide.kt │ │ │ ├── tag │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Checkable.kt │ │ │ ├── Colorful.kt │ │ │ ├── Control.kt │ │ │ ├── Controlled.kt │ │ │ └── HotTags.kt │ │ │ ├── timeline │ │ │ ├── Alternate.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Color.kt │ │ │ ├── Custom.kt │ │ │ ├── Pending.kt │ │ │ └── Right.kt │ │ │ ├── timepicker │ │ │ ├── 12Hours.kt │ │ │ ├── Addon.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Disabled.kt │ │ │ ├── HideColumn.kt │ │ │ ├── IntervalOptions.kt │ │ │ ├── Size.kt │ │ │ ├── Suffix.kt │ │ │ └── Value.kt │ │ │ ├── tooltip │ │ │ ├── App.kt │ │ │ ├── ArrowPointAtCenter.kt │ │ │ ├── AutoAdjustOverflow.kt │ │ │ ├── Basic.kt │ │ │ └── Placement.kt │ │ │ ├── transfer │ │ │ ├── Advanced.kt │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── CustomItem.kt │ │ │ ├── LargeData.kt │ │ │ └── Search.kt │ │ │ ├── tree │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── BasicControlled.kt │ │ │ ├── CustomizedIcon.kt │ │ │ ├── Directory.kt │ │ │ ├── Dynamic.kt │ │ │ └── Line.kt │ │ │ ├── treeselect │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Checkable.kt │ │ │ ├── Multiple.kt │ │ │ ├── Suffix.kt │ │ │ └── TreeData.kt │ │ │ ├── typography │ │ │ ├── App.kt │ │ │ ├── Basic.kt │ │ │ ├── Ellipsis.kt │ │ │ ├── Interactive.kt │ │ │ ├── Text.kt │ │ │ └── Title.kt │ │ │ └── upload │ │ │ ├── App.kt │ │ │ ├── Avatar.kt │ │ │ ├── Basic.kt │ │ │ ├── DefaultFileList.kt │ │ │ ├── Directory.kt │ │ │ ├── Drag.kt │ │ │ ├── FileList.kt │ │ │ ├── PictureCard.kt │ │ │ ├── PictureStyle.kt │ │ │ └── PreviewFile.kt │ │ └── resources │ │ ├── favicon.ico │ │ ├── index.html │ │ └── manifest.json ├── build.gradle.kts ├── gradle.properties └── src │ └── main │ └── kotlin │ └── antd │ ├── Attributes.kt │ ├── Events.kt │ ├── Types.kt │ ├── Util.kt │ ├── affix │ ├── Affix.kt │ └── AffixDsl.kt │ ├── alert │ ├── Alert.kt │ ├── AlertDsl.kt │ └── ErrorBoundary.kt │ ├── anchor │ ├── Anchor.kt │ ├── AnchorContext.kt │ ├── AnchorDsl.kt │ ├── AnchorLink.kt │ └── AnchorTypes.kt │ ├── autocomplete │ ├── AutoComplete.kt │ ├── AutoCompleteDsl.kt │ └── AutoCompleteTypes.kt │ ├── avatar │ ├── Avatar.kt │ ├── AvatarDsl.kt │ ├── AvatarTypes.kt │ ├── Group.kt │ └── SizeContext.kt │ ├── backtop │ ├── BackTop.kt │ └── BackTopDsl.kt │ ├── badge │ ├── Badge.kt │ ├── BadgeDsl.kt │ ├── BadgeTypes.kt │ ├── Ribbon.kt │ └── ScrollNumber.kt │ ├── breadcrumb │ ├── Breadcrumb.kt │ ├── BreadcrumbDsl.kt │ ├── BreadcrumbItem.kt │ └── BreadcrumbSeparator.kt │ ├── button │ ├── Button.kt │ ├── ButtonDsl.kt │ ├── ButtonGroup.kt │ ├── ButtonTypes.kt │ └── LoadingIcon.kt │ ├── calendar │ ├── Calendar.kt │ ├── CalendarDsl.kt │ ├── CalendarTypes.kt │ └── Header.kt │ ├── card │ ├── Card.kt │ ├── CardDsl.kt │ ├── CardTypes.kt │ ├── Grid.kt │ └── Meta.kt │ ├── carousel │ ├── Carousel.kt │ ├── CarouselDsl.kt │ ├── CarouselTypes.kt │ └── Slider.kt │ ├── cascader │ ├── Cascader.kt │ ├── CascaderDsl.kt │ └── CascaderTypes.kt │ ├── checkbox │ ├── Checkbox.kt │ ├── CheckboxDsl.kt │ ├── CheckboxTypes.kt │ └── Group.kt │ ├── collapse │ ├── Collapse.kt │ ├── CollapseDsl.kt │ ├── CollapsePanel.kt │ └── CollapseTypes.kt │ ├── comment │ ├── Comment.kt │ └── CommentDsl.kt │ ├── configprovider │ ├── ConfigProvider.kt │ ├── ConfigProviderDsl.kt │ ├── ConfigProviderTypes.kt │ ├── Context.kt │ └── SizeContext.kt │ ├── datepicker │ ├── DatePicker.kt │ ├── DatePickerDsl.kt │ ├── DatePickerTypes.kt │ ├── MonthPicker.kt │ ├── Picker.kt │ ├── PickerPanel.kt │ ├── QuarterPicker.kt │ ├── RangePicker.kt │ ├── TimePicker.kt │ ├── WeekPicker.kt │ └── YearPicker.kt │ ├── descriptions │ ├── Cell.kt │ ├── Descriptions.kt │ ├── DescriptionsDsl.kt │ ├── Item.kt │ └── Row.kt │ ├── divider │ ├── Divider.kt │ └── DividerDsl.kt │ ├── drawer │ ├── Drawer.kt │ ├── DrawerDsl.kt │ └── DrawerTypes.kt │ ├── dropdown │ ├── Dropdown.kt │ ├── DropdownButton.kt │ ├── DropdownDsl.kt │ └── DropdownTypes.kt │ ├── empty │ ├── Empty.kt │ ├── EmptyDsl.kt │ └── Simple.kt │ ├── form │ ├── Form.kt │ ├── FormContext.kt │ ├── FormDsl.kt │ ├── FormErrorList.kt │ ├── FormHooks.kt │ ├── FormItem.kt │ ├── FormItemInput.kt │ ├── FormItemLabel.kt │ ├── FormList.kt │ └── FormTypes.kt │ ├── grid │ ├── Col.kt │ ├── GridDsl.kt │ ├── GridTypes.kt │ ├── Hooks.kt │ ├── Row.kt │ └── RowContext.kt │ ├── icon │ ├── Icon.kt │ ├── IconDsl.kt │ ├── IconFont.kt │ ├── IconTypes.kt │ ├── Icons.kt │ └── IconsDsl.kt │ ├── image │ ├── Image.kt │ └── ImageDsl.kt │ ├── input │ ├── ClearableLabeledInput.kt │ ├── Group.kt │ ├── Input.kt │ ├── InputDsl.kt │ ├── InputTypes.kt │ ├── Password.kt │ ├── Search.kt │ └── TextArea.kt │ ├── inputnumber │ ├── InputNumber.kt │ └── InputNumberDsl.kt │ ├── layout │ ├── Layout.kt │ ├── LayoutDsl.kt │ ├── LayoutTypes.kt │ └── Sider.kt │ ├── list │ ├── List.kt │ ├── ListDsl.kt │ ├── ListItem.kt │ └── ListTypes.kt │ ├── localeprovider │ ├── ArEG.kt │ ├── BgEG.kt │ ├── CaES.kt │ ├── CsCZ.kt │ ├── DaDK.kt │ ├── DeDE.kt │ ├── ElGR.kt │ ├── EnGB.kt │ ├── EnUS.kt │ ├── EsES.kt │ ├── EtEE.kt │ ├── FaIR.kt │ ├── FiFI.kt │ ├── FrBE.kt │ ├── FrFR.kt │ ├── HeIL.kt │ ├── HiIN.kt │ ├── HrHR.kt │ ├── HuHU.kt │ ├── IdID.kt │ ├── IsIS.kt │ ├── ItIT.kt │ ├── JaJP.kt │ ├── KnIN.kt │ ├── KoKR.kt │ ├── KuIQ.kt │ ├── LocaleProvider.kt │ ├── LocaleProviderDsl.kt │ ├── LocaleReceiver.kt │ ├── LvLV.kt │ ├── MnMN.kt │ ├── NbNO.kt │ ├── NeNP.kt │ ├── NlBE.kt │ ├── NlNL.kt │ ├── PlPL.kt │ ├── PtBR.kt │ ├── PtPT.kt │ ├── RuRU.kt │ ├── SkSK.kt │ ├── SlSI.kt │ ├── SrRS.kt │ ├── SvSE.kt │ ├── ThTH.kt │ ├── TrTR.kt │ ├── UkUA.kt │ ├── ViVN.kt │ ├── ZhCN.kt │ └── ZhTW.kt │ ├── mentions │ ├── Mentions.kt │ ├── MentionsDsl.kt │ ├── MentionsTypes.kt │ └── Option.kt │ ├── menu │ ├── Divider.kt │ ├── Menu.kt │ ├── MenuContext.kt │ ├── MenuDsl.kt │ ├── MenuItem.kt │ ├── MenuItemGroup.kt │ ├── MenuTypes.kt │ └── SubMenu.kt │ ├── message │ ├── Hooks.kt │ ├── Message.kt │ └── MessageTypes.kt │ ├── modal │ ├── ActionButton.kt │ ├── Confirm.kt │ ├── ConfirmDialog.kt │ ├── Hooks.kt │ ├── Modal.kt │ ├── ModalDsl.kt │ └── ModalTypes.kt │ ├── notification │ ├── Hooks.kt │ ├── Notification.kt │ └── NotificationTypes.kt │ ├── pageheader │ ├── PageHeader.kt │ └── PageHeaderDsl.kt │ ├── pagination │ ├── MiniSelect.kt │ ├── Pagination.kt │ ├── PaginationDsl.kt │ └── PaginationTypes.kt │ ├── popconfirm │ ├── Popconfirm.kt │ └── PopconfirmDsl.kt │ ├── popover │ ├── Popover.kt │ └── PopoverDsl.kt │ ├── progress │ ├── Circle.kt │ ├── Line.kt │ ├── Progress.kt │ ├── ProgressDsl.kt │ ├── ProgressTypes.kt │ └── Steps.kt │ ├── radio │ ├── Context.kt │ ├── Group.kt │ ├── Radio.kt │ ├── RadioButton.kt │ ├── RadioDsl.kt │ └── RadioTypes.kt │ ├── rate │ ├── Rate.kt │ └── RateDsl.kt │ ├── result │ ├── NoFound.kt │ ├── Result.kt │ ├── ResultDsl.kt │ ├── ResultTypes.kt │ ├── ServerError.kt │ └── Unauthorized.kt │ ├── select │ ├── Option.kt │ ├── OptionGroup.kt │ ├── OptionList.kt │ ├── Select.kt │ ├── SelectDsl.kt │ └── SelectTypes.kt │ ├── skeleton │ ├── Avatar.kt │ ├── Button.kt │ ├── Element.kt │ ├── Image.kt │ ├── Input.kt │ ├── Paragraph.kt │ ├── Skeleton.kt │ ├── SkeletonDsl.kt │ ├── SkeletonTypes.kt │ └── Title.kt │ ├── slider │ ├── Slider.kt │ ├── SliderDsl.kt │ ├── SliderTooltip.kt │ └── SliderTypes.kt │ ├── space │ ├── Item.kt │ ├── Space.kt │ └── SpaceDsl.kt │ ├── spin │ ├── Spin.kt │ ├── SpinDsl.kt │ └── SpinTypes.kt │ ├── statistic │ ├── Countdown.kt │ ├── Number.kt │ ├── Statistic.kt │ ├── StatisticDsl.kt │ └── StatisticTypes.kt │ ├── steps │ ├── Step.kt │ ├── Steps.kt │ └── StepsDsl.kt │ ├── switch │ ├── Switch.kt │ ├── SwitchDsl.kt │ └── SwitchTypes.kt │ ├── table │ ├── Column.kt │ ├── ColumnGroup.kt │ ├── ExpandIcon.kt │ ├── Hooks.kt │ ├── Summary.kt │ ├── Table.kt │ ├── TableDsl.kt │ └── TableTypes.kt │ ├── tabs │ ├── TabPane.kt │ ├── Tabs.kt │ ├── TabsDsl.kt │ └── TabsTypes.kt │ ├── tag │ ├── CheckableTag.kt │ ├── Tag.kt │ └── TagDsl.kt │ ├── timeline │ ├── Timeline.kt │ ├── TimelineDsl.kt │ └── TimelineItem.kt │ ├── timepicker │ ├── TimePicker.kt │ └── TimePickerDsl.kt │ ├── tooltip │ ├── Tooltip.kt │ ├── TooltipDsl.kt │ ├── TooltipTypes.kt │ ├── Trigger.kt │ └── TriggerTypes.kt │ ├── transfer │ ├── List.kt │ ├── ListBody.kt │ ├── ListItem.kt │ ├── Operation.kt │ ├── Search.kt │ ├── Transfer.kt │ ├── TransferDsl.kt │ └── TransferTypes.kt │ ├── tree │ ├── Context.kt │ ├── DirectoryTree.kt │ ├── Tree.kt │ ├── TreeDsl.kt │ ├── TreeNode.kt │ └── TreeTypes.kt │ ├── treeselect │ ├── Context.kt │ ├── OptionList.kt │ ├── TreeNode.kt │ ├── TreeSelect.kt │ ├── TreeSelectDsl.kt │ └── TreeSelectTypes.kt │ ├── typography │ ├── Base.kt │ ├── Editable.kt │ ├── Link.kt │ ├── Paragraph.kt │ ├── Text.kt │ ├── Title.kt │ ├── Typography.kt │ ├── TypographyDsl.kt │ └── TypographyTypes.kt │ └── upload │ ├── Dragger.kt │ ├── ListItem.kt │ ├── Upload.kt │ ├── UploadDsl.kt │ ├── UploadList.kt │ └── UploadTypes.kt ├── kotlin-js-store └── yarn.lock ├── kotlin-moment ├── README.md ├── build.gradle.kts ├── gradle.properties ├── moment-samples │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── kotlin │ │ └── samples │ │ │ ├── App.kt │ │ │ ├── CalendarTime.kt │ │ │ ├── FormatDate.kt │ │ │ ├── Main.kt │ │ │ ├── MultipleLocale.kt │ │ │ └── RelativeTime.kt │ │ └── resources │ │ ├── favicon.ico │ │ ├── index.html │ │ └── manifest.json └── src │ └── main │ └── kotlin │ └── moment │ ├── Constructor.kt │ ├── Moment.kt │ └── Types.kt ├── kotlin-react-intl ├── README.md ├── build.gradle.kts ├── gradle.properties ├── react-intl-samples │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── kotlin │ │ └── samples │ │ │ ├── Advanced.kt │ │ │ ├── App.kt │ │ │ ├── Bug2727.kt │ │ │ ├── HandleChange.kt │ │ │ ├── Hooks.kt │ │ │ ├── Injected.kt │ │ │ ├── Main.kt │ │ │ ├── Messages.kt │ │ │ ├── Plural.kt │ │ │ └── TimeZone.kt │ │ └── resources │ │ ├── en.json │ │ ├── favicon.ico │ │ ├── fr.json │ │ ├── index.html │ │ └── manifest.json └── src │ └── main │ └── kotlin │ └── reactintl │ ├── Elements.kt │ ├── Errors.kt │ ├── Formatters.kt │ ├── ReactIntl.kt │ ├── Types.kt │ ├── Utils.kt │ └── components │ ├── InjectIntl.kt │ ├── UseIntl.kt │ ├── datetime │ ├── DateTimeTypes.kt │ └── FormattedDateTime.kt │ ├── displayname │ └── FormattedDisplayName.kt │ ├── list │ ├── FormattedList.kt │ └── ListTypes.kt │ ├── message │ ├── FormattedMessage.kt │ └── MessageTypes.kt │ ├── number │ ├── FormattedNumber.kt │ └── NumberTypes.kt │ ├── plural │ ├── FormattedPlural.kt │ └── PluralTypes.kt │ ├── provider │ ├── Provider.kt │ └── ProviderTypes.kt │ └── relativetime │ ├── FormattedRelativeTime.kt │ └── RelativeTimeTypes.kt ├── kotlin-react-responsive ├── README.md ├── build.gradle.kts ├── gradle.properties ├── react-responsive-samples │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── kotlin │ │ └── samples │ │ │ ├── App.kt │ │ │ ├── Main.kt │ │ │ ├── WithComponents.kt │ │ │ └── WithHooks.kt │ │ └── resources │ │ ├── favicon.ico │ │ ├── index.html │ │ └── manifest.json └── src │ └── main │ └── kotlin │ └── reactresponsive │ ├── MediaQuery.kt │ ├── MediaQueryHooks.kt │ └── MediaQueryTypes.kt ├── kotlin-uikit ├── README.md ├── build.gradle.kts ├── gradle.properties ├── src │ └── main │ │ └── kotlin │ │ └── uikit │ │ ├── UIKit.kt │ │ ├── UIKitComponent.kt │ │ ├── components │ │ ├── Accordion.kt │ │ ├── Alert.kt │ │ ├── Countdown.kt │ │ ├── Cover.kt │ │ ├── Drop.kt │ │ ├── Dropdown.kt │ │ ├── Filter.kt │ │ ├── Form.kt │ │ ├── Grid.kt │ │ ├── Height.kt │ │ ├── Icon.kt │ │ ├── Image.kt │ │ ├── Leader.kt │ │ ├── Lightbox.kt │ │ ├── Margin.kt │ │ ├── Modal.kt │ │ ├── Nav.kt │ │ ├── Navbar.kt │ │ ├── Notification.kt │ │ ├── OffCanvas.kt │ │ ├── Parallax.kt │ │ ├── Scroll.kt │ │ ├── Scrollspy.kt │ │ ├── Slider.kt │ │ ├── Slideshow.kt │ │ ├── Sortable.kt │ │ ├── Sticky.kt │ │ ├── Svg.kt │ │ ├── Switcher.kt │ │ ├── Tab.kt │ │ ├── Toggle.kt │ │ ├── Tooltip.kt │ │ ├── Upload.kt │ │ └── Video.kt │ │ └── util │ │ ├── Ajax.kt │ │ ├── Animation.kt │ │ ├── Attr.kt │ │ ├── Class.kt │ │ ├── Dimensions.kt │ │ ├── Dom.kt │ │ ├── Env.kt │ │ ├── Event.kt │ │ ├── FastDom.kt │ │ ├── Filter.kt │ │ ├── Lang.kt │ │ ├── Mouse.kt │ │ ├── Options.kt │ │ ├── Player.kt │ │ ├── Position.kt │ │ ├── Promise.kt │ │ ├── Selector.kt │ │ ├── Style.kt │ │ └── Viewport.kt └── uikit-samples │ ├── build.gradle.kts │ └── src │ └── main │ ├── kotlin │ └── samples │ │ ├── App.kt │ │ └── Main.kt │ └── resources │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── settings.gradle.kts /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE 2 | .idea/ 3 | 4 | # Build 5 | build/ 6 | out/ 7 | .gradle/ -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") apply false 3 | } 4 | 5 | subprojects { 6 | group = "io.sunland" 7 | version = if (!project.name.contains("samples")) { 8 | version(project.name) 9 | } else "1.0-SNAPSHOT" 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | } -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import java.util.* 2 | 3 | plugins { 4 | `kotlin-dsl` 5 | } 6 | 7 | repositories { 8 | gradlePluginPortal() 9 | } 10 | 11 | val props = Properties().apply { 12 | file("../gradle.properties").inputStream().use { load(it) } 13 | } 14 | 15 | fun version(target: String) = props.getProperty("${target}.version") 16 | 17 | dependencies { 18 | implementation(kotlin("gradle-plugin", version("kotlin"))) 19 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/Dependencies.kt: -------------------------------------------------------------------------------- 1 | import org.gradle.api.Project 2 | import org.gradle.kotlin.dsl.the 3 | import org.jetbrains.kotlin.gradle.targets.js.npm.NpmDependency 4 | import org.jetbrains.kotlin.gradle.targets.js.npm.NpmDependencyExtension 5 | 6 | fun Project.kotlinWrapperDependency(name: String) = 7 | "org.jetbrains.kotlin-wrappers:kotlin-$name:${wrapperVersion(name)}" 8 | 9 | fun Project.npmPackage(name: String): NpmDependency { 10 | return dependencies.the()(name, npmVersion(name)) 11 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/Versions.kt: -------------------------------------------------------------------------------- 1 | import org.gradle.api.Project 2 | 3 | fun Project.kotlinVersion() = version("kotlin") 4 | 5 | fun Project.wrapperVersion(name: String) = version("kotlin-$name") 6 | fun Project.npmVersion(name: String) = "^${version("kotlin-$name")}" 7 | .replaceAfter("-", "") 8 | .removeSuffix("-") 9 | 10 | fun Project.version(target: String) = property("${target}.version") as String -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official 2 | 3 | kotlin.version=1.7.21 4 | 5 | kotlin-react.version=18.2.0-pre.436 6 | kotlin-react-dom.version=18.2.0-pre.436 7 | kotlin-emotion.version=11.10.5-pre.436 8 | 9 | # kotlin-antd.version=4.8.6-pre.16 (Discontinued) 10 | # kotlin-moment.version=2.29.1-pre.15 (Discontinued) 11 | 12 | kotlin-react-intl.version=5.24.8-pre.23 13 | kotlin-react-responsive.version=8.2.0-pre.21 14 | kotlin-uikit.version=3.13.7-pre.21 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxiadenine/kotlin-js-wrappers/e0017a108b36025630c354c7663256347e867251/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | implementation(project(":kotlin-antd")) 7 | implementation(project(":kotlin-moment")) 8 | 9 | implementation(kotlinWrapperDependency("styled")) 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/Main.kt: -------------------------------------------------------------------------------- 1 | package samples 2 | 3 | import kotlinext.js.require 4 | import kotlinx.browser.document 5 | import react.dom.render 6 | 7 | fun main() { 8 | require("antd/dist/antd.css") 9 | 10 | render(document.getElementById("root")!!) { 11 | app() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/affix/OnChange.kt: -------------------------------------------------------------------------------- 1 | package samples.affix 2 | 3 | import antd.affix.affix 4 | import antd.button.button 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.onChange() { 10 | styledDiv { 11 | css { +AffixStyles.onChange } 12 | affix { 13 | attrs { 14 | offsetTop = 120 15 | onChange = { affixed -> console.log(affixed) } 16 | } 17 | button { +"120px to affix top" } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/alert/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.alert 2 | 3 | import antd.alert.alert 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +AlertStyles.basic } 11 | alert { 12 | attrs { 13 | message = "Success Text" 14 | type = "success" 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/alert/CloseText.kt: -------------------------------------------------------------------------------- 1 | package samples.alert 2 | 3 | import antd.alert.alert 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.closeText() { 9 | styledDiv { 10 | css { +AlertStyles.closeText } 11 | alert { 12 | attrs { 13 | message = "Info Text" 14 | type = "info" 15 | closeText = "Close Now" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/avatar/Fallback.kt: -------------------------------------------------------------------------------- 1 | package samples.avatar 2 | 3 | import antd.avatar.avatar 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.fallback() { 9 | styledDiv { 10 | css { +AvatarStyles.fallback } 11 | avatar { 12 | attrs { 13 | shape = "circle" 14 | src = "http://abc.com/not-exist.jpg" 15 | } 16 | +"A" 17 | } 18 | avatar { 19 | attrs { 20 | shape = "circle" 21 | src = "http://abc.com/not-exist.jpg" 22 | } 23 | +"ABC" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/backtop/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.backtop 2 | 3 | import antd.backtop.backTop 4 | import kotlinx.css.color 5 | import kotlinx.css.rgba 6 | import react.RBuilder 7 | import react.dom.div 8 | import styled.css 9 | import styled.styledDiv 10 | import styled.styledStrong 11 | 12 | fun RBuilder.basic() { 13 | styledDiv { 14 | css { +BackTopStyles.basic } 15 | div { 16 | backTop {} 17 | +"Scroll down to see the bottom-right" 18 | styledStrong { 19 | css { color = rgba(64, 64, 64, 0.6) } 20 | +" gray " 21 | } 22 | +"button." 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/backtop/Custom.kt: -------------------------------------------------------------------------------- 1 | package samples.backtop 2 | 3 | import antd.backtop.backTop 4 | import kotlinx.css.Color 5 | import kotlinx.css.color 6 | import react.RBuilder 7 | import react.dom.div 8 | import styled.css 9 | import styled.styledDiv 10 | import styled.styledStrong 11 | 12 | fun RBuilder.custom() { 13 | styledDiv { 14 | css { +BackTopStyles.custom } 15 | div { 16 | backTop { 17 | div(classes = "ant-back-top-inner") { +"UP" } 18 | } 19 | +"Scroll down to see the bottom-right" 20 | styledStrong { 21 | css { color = Color("#1088e9") } 22 | +" blue " 23 | } 24 | +"button." 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/badge/Link.kt: -------------------------------------------------------------------------------- 1 | package samples.badge 2 | 3 | import antd.badge.badge 4 | import kotlinx.html.classes 5 | import react.RBuilder 6 | import react.dom.a 7 | import react.dom.span 8 | import styled.css 9 | import styled.styledDiv 10 | 11 | fun RBuilder.link() { 12 | styledDiv { 13 | css { +BadgeStyles.link } 14 | a { 15 | attrs.href = "#" 16 | badge { 17 | attrs.count = 5 18 | span { 19 | attrs.classes = setOf("head-example") 20 | } 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/badge/Offset.kt: -------------------------------------------------------------------------------- 1 | package samples.badge 2 | 3 | import antd.badge.badge 4 | import kotlinx.html.classes 5 | import react.RBuilder 6 | import react.dom.a 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.offset() { 11 | styledDiv { 12 | css { +BadgeStyles.offset } 13 | badge { 14 | attrs { 15 | count = 5 16 | offset = arrayOf(10, 10) 17 | } 18 | a { 19 | attrs.href = "#" 20 | attrs.classes = setOf("head-example") 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/badge/Ribbon.kt: -------------------------------------------------------------------------------- 1 | package samples.badge 2 | 3 | import antd.badge.badgeRibbon 4 | import antd.card.card 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.ribbon() { 10 | styledDiv { 11 | css { +BadgeStyles.ribbon } 12 | badgeRibbon { 13 | attrs.text = "Pushes open the window" 14 | card { +"And raises the spyglass." } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/badge/Ttitle.kt: -------------------------------------------------------------------------------- 1 | package samples.badge 2 | 3 | import antd.badge.badge 4 | import kotlinx.html.classes 5 | import react.RBuilder 6 | import react.dom.a 7 | import react.dom.attrs 8 | import react.dom.div 9 | import styled.css 10 | import styled.styledDiv 11 | 12 | fun RBuilder.title() { 13 | styledDiv { 14 | css { +BadgeStyles.title } 15 | div { 16 | badge { 17 | attrs { 18 | count = 5 19 | title = "Custom hover text" 20 | } 21 | a { 22 | attrs { 23 | classes = setOf("head-example") 24 | href = "#" 25 | } 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/button/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.button 2 | 3 | import antd.button.button 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +ButtonStyles.basic } 11 | button { 12 | attrs.type = "primary" 13 | +"Primary" 14 | } 15 | button { +"Default" } 16 | button { 17 | attrs.type = "dashed" 18 | +"Dashed" 19 | } 20 | button { 21 | attrs.type = "danger" 22 | +"Danger" 23 | } 24 | button { 25 | attrs.type = "link" 26 | +"Link" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/calendar/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.calendar 2 | 3 | import antd.calendar.CalendarMode 4 | import antd.calendar.calendar 5 | import moment.Moment 6 | import react.RBuilder 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | private fun handlePanelChange(value: Moment?, mode: CalendarMode?) { 11 | console.log(value, mode) 12 | } 13 | 14 | fun RBuilder.basic() { 15 | styledDiv { 16 | css { +CalendarStyles.basic } 17 | calendar { 18 | attrs.onPanelChange = ::handlePanelChange 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/card/Simple.kt: -------------------------------------------------------------------------------- 1 | package samples.card 2 | 3 | import antd.card.card 4 | import kotlinext.js.js 5 | import react.RBuilder 6 | import react.dom.p 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.simple() { 11 | styledDiv { 12 | css { +CardStyles.simple } 13 | card { 14 | attrs.style = js { width = 300 } 15 | p { +"Card content" } 16 | p { +"Card content" } 17 | p { +"Card content" } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/carousel/Autoplay.kt: -------------------------------------------------------------------------------- 1 | package samples.carousel 2 | 3 | import antd.carousel.carousel 4 | import react.RBuilder 5 | import react.dom.div 6 | import react.dom.h3 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.autoplay() { 11 | styledDiv { 12 | css { +CarouselStyles.autoplay } 13 | carousel { 14 | attrs.autoplay = true 15 | div { 16 | h3 { +"1" } 17 | } 18 | div { 19 | h3 { +"2" } 20 | } 21 | div { 22 | h3 { +"3" } 23 | } 24 | div { 25 | h3 { +"4" } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/carousel/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.carousel 2 | 3 | import antd.carousel.carousel 4 | import react.RBuilder 5 | import react.dom.div 6 | import react.dom.h3 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | private fun onChange(currentSlide: Number) { 11 | console.log(currentSlide) 12 | } 13 | 14 | fun RBuilder.basic() { 15 | styledDiv { 16 | css { +CarouselStyles.basic } 17 | carousel { 18 | attrs.afterChange = ::onChange 19 | div { 20 | h3 { +"1" } 21 | } 22 | div { 23 | h3 { +"2" } 24 | } 25 | div { 26 | h3 { +"3" } 27 | } 28 | div { 29 | h3 { +"4" } 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/carousel/Fade.kt: -------------------------------------------------------------------------------- 1 | package samples.carousel 2 | 3 | import antd.carousel.carousel 4 | import react.RBuilder 5 | import react.dom.div 6 | import react.dom.h3 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.fade() { 11 | styledDiv { 12 | css { +CarouselStyles.fade } 13 | carousel { 14 | attrs.effect = "fade" 15 | div { 16 | h3 { +"1" } 17 | } 18 | div { 19 | h3 { +"2" } 20 | } 21 | div { 22 | h3 { +"3" } 23 | } 24 | div { 25 | h3 { +"4" } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/checkbox/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.checkbox 2 | 3 | import antd.checkbox.CheckboxChangeEvent 4 | import antd.checkbox.checkbox 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | private fun handleChange(event: CheckboxChangeEvent) { 10 | console.log("checked = ${event.target.checked}") 11 | } 12 | 13 | fun RBuilder.basic() { 14 | styledDiv { 15 | css { +CheckboxStyles.basic } 16 | checkbox { 17 | attrs.onChange = ::handleChange 18 | +"Checkbox" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/checkbox/Disabled.kt: -------------------------------------------------------------------------------- 1 | package samples.checkbox 2 | 3 | import antd.checkbox.checkbox 4 | import react.RBuilder 5 | import react.dom.br 6 | import react.dom.div 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.disabled() { 11 | styledDiv { 12 | css { +CheckboxStyles.disabled } 13 | div { 14 | checkbox { 15 | attrs { 16 | defaultChecked = false 17 | disabled = true 18 | } 19 | } 20 | br {} 21 | checkbox { 22 | attrs { 23 | defaultChecked = true 24 | disabled = true 25 | } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/divider/Vertical.kt: -------------------------------------------------------------------------------- 1 | package samples.divider 2 | 3 | import antd.divider.divider 4 | import react.RBuilder 5 | import react.dom.a 6 | import react.dom.div 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.vertical() { 11 | styledDiv { 12 | css { +DividerStyles.vertical } 13 | div { 14 | +"Text" 15 | divider { 16 | attrs.type = "vertical" 17 | } 18 | a { 19 | attrs.href = "#" 20 | +"Link" 21 | } 22 | divider { 23 | attrs.type = "vertical" 24 | } 25 | a { 26 | attrs.href = "#" 27 | +"Link" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/empty/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.empty 2 | 3 | import antd.empty.empty 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +EmptyStyles.basic } 11 | empty {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/empty/Simple.kt: -------------------------------------------------------------------------------- 1 | package samples.empty 2 | 3 | import antd.empty.EmptyComponent 4 | import antd.empty.empty 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.simple() { 10 | styledDiv { 11 | css { +EmptyStyles.simple } 12 | empty { 13 | attrs.image = EmptyComponent.PRESENTED_IMAGE_SIMPLE 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/icon/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.icon 2 | 3 | import antd.icon.* 4 | import kotlinx.html.classes 5 | import react.RBuilder 6 | import react.dom.div 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.basic() { 11 | styledDiv { 12 | css { +IconStyles.basic } 13 | div { 14 | attrs.classes = setOf("icons-list") 15 | homeOutlined {} 16 | settingFilled {} 17 | smileOutlined {} 18 | syncOutlined { 19 | attrs.spin = true 20 | } 21 | smileOutlined { 22 | attrs.rotate = 180 23 | } 24 | loadingOutlined {} 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/icon/TwoTone.kt: -------------------------------------------------------------------------------- 1 | package samples.icon 2 | 3 | import antd.icon.checkCircleTwoTone 4 | import antd.icon.heartTwoTone 5 | import antd.icon.smileTwoTone 6 | import kotlinx.html.classes 7 | import react.RBuilder 8 | import react.dom.div 9 | import styled.css 10 | import styled.styledDiv 11 | 12 | fun RBuilder.twoTone() { 13 | styledDiv { 14 | css { +IconStyles.twoTone } 15 | div { 16 | attrs.classes = setOf("icons-list") 17 | smileTwoTone {} 18 | heartTwoTone { 19 | attrs.twoToneColor = "#eb2f96" 20 | } 21 | checkCircleTwoTone { 22 | attrs.twoToneColor = "#52c41a" 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/image/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.image 2 | 3 | import antd.image.image 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | private fun RBuilder.imageDemo() { 9 | image { 10 | attrs { 11 | width = 200 12 | src = "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" 13 | } 14 | } 15 | } 16 | 17 | fun RBuilder.basic() { 18 | styledDiv { 19 | css { +ImageStyles.basic } 20 | imageDemo() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/input/AllowClear.kt: -------------------------------------------------------------------------------- 1 | package samples.input 2 | 3 | import antd.ChangeEventHandler 4 | import antd.input.input 5 | import org.w3c.dom.HTMLInputElement 6 | import react.RBuilder 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | private val handleChange: ChangeEventHandler = { 11 | console.log(it) 12 | } 13 | 14 | fun RBuilder.allowClear() { 15 | styledDiv { 16 | css { +InputStyles.allowClear } 17 | input { 18 | attrs { 19 | placeholder = "Input with clear icon" 20 | allowClear = true 21 | onChange = handleChange 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/input/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.input 2 | 3 | import antd.input.input 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +InputStyles.basic } 11 | input { 12 | attrs.placeholder = "Basic usage" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/input/PasswordInput.kt: -------------------------------------------------------------------------------- 1 | package samples.input 2 | 3 | import antd.input.password 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.passwordInput() { 9 | styledDiv { 10 | css { +InputStyles.passwordInput } 11 | password { 12 | attrs.placeholder = "input password" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/input/Textarea.kt: -------------------------------------------------------------------------------- 1 | package samples.input 2 | 3 | import antd.input.textArea 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.textarea() { 9 | styledDiv { 10 | css { +InputStyles.textarea } 11 | textArea { 12 | attrs.rows = 4 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/inputnumber/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.inputnumber 2 | 3 | import antd.inputnumber.inputNumber 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | private fun handleChange(value: Any?) { 9 | console.log("changed", value) 10 | } 11 | 12 | fun RBuilder.basic() { 13 | styledDiv { 14 | css { +InputNumberStyles.basic } 15 | inputNumber { 16 | attrs { 17 | min = 1 18 | max = 10 19 | defaultValue = 3 20 | onChange = ::handleChange 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/inputnumber/Digit.kt: -------------------------------------------------------------------------------- 1 | package samples.inputnumber 2 | 3 | import antd.inputnumber.inputNumber 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | private fun handleChange(value: Any?) { 9 | console.log("changed", value) 10 | } 11 | 12 | fun RBuilder.digit() { 13 | styledDiv { 14 | css { +InputNumberStyles.digit } 15 | inputNumber { 16 | attrs { 17 | min = 0 18 | max = 10 19 | step = 0.1 20 | onChange = ::handleChange 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/localeprovider/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.localeprovider 2 | 3 | import antd.localeprovider.localeProvider 4 | import antd.localeprovider.zhCN 5 | import antd.pagination.pagination 6 | import react.RBuilder 7 | import react.dom.div 8 | import styled.css 9 | import styled.styledDiv 10 | 11 | fun RBuilder.basicApp() { 12 | div { 13 | pagination { 14 | attrs { 15 | defaultCurrent = 1 16 | total = 50 17 | showSizeChanger = true 18 | } 19 | } 20 | } 21 | } 22 | 23 | fun RBuilder.basic() { 24 | styledDiv { 25 | css { LocaleProviderStyles.basic } 26 | localeProvider { 27 | attrs.locale = zhCN 28 | basicApp() 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/message/Duration.kt: -------------------------------------------------------------------------------- 1 | package samples.message 2 | 3 | import antd.MouseEventHandler 4 | import antd.button.button 5 | import antd.message.message 6 | import react.RBuilder 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | private val success: MouseEventHandler = { 11 | message.success("This is a prompt message for success, and it will disappear in 10 seconds", 10) 12 | } 13 | 14 | fun RBuilder.duration() { 15 | styledDiv { 16 | css { +MessageStyles.duration } 17 | button { 18 | attrs.onClick = success 19 | +"Customized display duration" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/message/Info.kt: -------------------------------------------------------------------------------- 1 | package samples.message 2 | 3 | import antd.MouseEventHandler 4 | import antd.button.button 5 | import antd.message.message 6 | import react.RBuilder 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | private val info: MouseEventHandler = { 11 | message.info("This is a normal message") 12 | } 13 | 14 | fun RBuilder.info() { 15 | styledDiv { 16 | css { +MessageStyles.info } 17 | button { 18 | attrs { 19 | type = "primary" 20 | onClick = info 21 | } 22 | +"Display normal message" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/message/Loading.kt: -------------------------------------------------------------------------------- 1 | package samples.message 2 | 3 | import antd.MouseEventHandler 4 | import antd.button.button 5 | import antd.message.message 6 | import kotlinx.browser.window 7 | import react.RBuilder 8 | import styled.css 9 | import styled.styledDiv 10 | 11 | private val success: MouseEventHandler = { 12 | val hide = message.loading("Action in progress..", 0) 13 | 14 | window.setTimeout(hide, 2500) 15 | } 16 | 17 | fun RBuilder.loading() { 18 | styledDiv { 19 | css { +MessageStyles.loading } 20 | button { 21 | attrs.onClick = success 22 | +"Display a loading indicator" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/message/Thenable.kt: -------------------------------------------------------------------------------- 1 | package samples.message 2 | 3 | import antd.MouseEventHandler 4 | import antd.button.button 5 | import antd.message.message 6 | import react.RBuilder 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | private val success: MouseEventHandler = { 11 | message.loading("Action in progress..", 2.5).promise 12 | .then { message.success("Loading finished", 2.5) } 13 | .then { message.info("Loading finished is finished", 2.5) } 14 | } 15 | 16 | fun RBuilder.thenable() { 17 | styledDiv { 18 | css { +MessageStyles.thenable } 19 | button { 20 | attrs.onClick = success 21 | +"Display a sequence of message" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/pageheader/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.pageheader 2 | 3 | import antd.pageheader.pageHeader 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +PageHeaderStyles.basic } 11 | pageHeader { 12 | attrs { 13 | onBack = {} 14 | title = "Title" 15 | subTitle = "This is a subtitle" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/pagination/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.pagination 2 | 3 | import antd.pagination.pagination 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +PaginationStyles.basic } 11 | pagination { 12 | attrs { 13 | defaultCurrent = 1 14 | total = 50 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/pagination/More.kt: -------------------------------------------------------------------------------- 1 | package samples.pagination 2 | 3 | import antd.pagination.pagination 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.more() { 9 | styledDiv { 10 | css { +PaginationStyles.more } 11 | pagination { 12 | attrs { 13 | defaultCurrent = 6 14 | total = 500 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/pagination/Simple.kt: -------------------------------------------------------------------------------- 1 | package samples.pagination 2 | 3 | import antd.pagination.pagination 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.simple() { 9 | styledDiv { 10 | css { +PaginationStyles.simple } 11 | pagination { 12 | attrs { 13 | simple = true 14 | defaultCurrent = 2 15 | total = 50 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/popconfirm/Locale.kt: -------------------------------------------------------------------------------- 1 | package samples.popconfirm 2 | 3 | import antd.popconfirm.popconfirm 4 | import react.RBuilder 5 | import react.dom.a 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.locale() { 10 | styledDiv { 11 | css { +PopconfirmStyles.locale } 12 | popconfirm { 13 | attrs { 14 | title = "Are you sure?" 15 | okText = "Yes" 16 | cancelText = "No" 17 | } 18 | a { 19 | attrs.href = "#" 20 | +"Delete" 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/progress/Dashboard.kt: -------------------------------------------------------------------------------- 1 | package samples.progress 2 | 3 | import antd.progress.progress 4 | import react.RBuilder 5 | import react.dom.div 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.dashboard() { 10 | styledDiv { 11 | css { +ProgressStyles.dashboard } 12 | div { 13 | progress { 14 | attrs { 15 | type = "dashboard" 16 | percent = 75 17 | } 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/radio/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.radio 2 | 3 | import antd.radio.radio 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +RadioStyles.basic } 11 | radio { +"Radio" } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/rate/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.rate 2 | 3 | import antd.rate.rate 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +RateStyles.basic } 11 | rate {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/rate/Clear.kt: -------------------------------------------------------------------------------- 1 | package samples.rate 2 | 3 | import antd.rate.rate 4 | import react.RBuilder 5 | import react.dom.br 6 | import react.dom.div 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.clear() { 11 | styledDiv { 12 | css { +RateStyles.clear } 13 | div { 14 | rate { 15 | attrs.defaultValue = 3 16 | } 17 | +"allowClear: true" 18 | br {} 19 | rate { 20 | attrs { 21 | allowClear = false 22 | defaultValue = 3 23 | } 24 | } 25 | +"allowClear: false" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/rate/Disabled.kt: -------------------------------------------------------------------------------- 1 | package samples.rate 2 | 3 | import antd.rate.rate 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.disabled() { 9 | styledDiv { 10 | css { +RateStyles.disabled } 11 | rate { 12 | attrs { 13 | disabled = true 14 | defaultValue = 2 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/rate/Half.kt: -------------------------------------------------------------------------------- 1 | package samples.rate 2 | 3 | import antd.rate.rate 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.half() { 9 | styledDiv { 10 | css { +RateStyles.half } 11 | rate { 12 | attrs { 13 | allowHalf = true 14 | defaultValue = 2.5 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/result/App.kt: -------------------------------------------------------------------------------- 1 | package samples.result 2 | 3 | import react.RBuilder 4 | import react.RComponent 5 | import react.Props 6 | import react.State 7 | import react.dom.h2 8 | import styled.StyleSheet 9 | import styled.css 10 | import styled.styledDiv 11 | 12 | object ResultStyles : StyleSheet("result", isStatic = true) { 13 | val container by css {} 14 | val basic by css {} 15 | val customIcon by css {} 16 | } 17 | 18 | class ResultApp : RComponent() { 19 | override fun RBuilder.render() { 20 | h2 { +"Result" } 21 | styledDiv { 22 | css { +ResultStyles.container } 23 | basic() 24 | customIcon() 25 | } 26 | } 27 | } 28 | 29 | fun RBuilder.resultApp() = child(ResultApp::class) {} 30 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/skeleton/Active.kt: -------------------------------------------------------------------------------- 1 | package samples.skeleton 2 | 3 | import antd.skeleton.skeleton 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.active() { 9 | styledDiv { 10 | css { +SkeletonStyles.active } 11 | skeleton { 12 | attrs.active = true 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/skeleton/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.skeleton 2 | 3 | import antd.skeleton.skeleton 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +SkeletonStyles.basic } 11 | skeleton {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/skeleton/Complex.kt: -------------------------------------------------------------------------------- 1 | package samples.skeleton 2 | 3 | import antd.skeleton.SkeletonParagraphProps 4 | import antd.skeleton.skeleton 5 | import kotlinext.js.jsObject 6 | import react.RBuilder 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.complex() { 11 | styledDiv { 12 | css { +SkeletonStyles.complex } 13 | skeleton { 14 | attrs { 15 | avatar = true 16 | paragraph = jsObject { rows = 4 } 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/slider/ShowTooltip.kt: -------------------------------------------------------------------------------- 1 | package samples.slider 2 | 3 | import antd.slider.slider 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.showTooltip() { 9 | styledDiv { 10 | css { +SliderStyles.showTooltip } 11 | slider { 12 | attrs { 13 | defaultValue = 30 14 | tooltipVisible = true 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/slider/TipFormatter.kt: -------------------------------------------------------------------------------- 1 | package samples.slider 2 | 3 | import antd.slider.slider 4 | import react.RBuilder 5 | import react.ReactElement 6 | import react.buildElement 7 | import react.dom.div 8 | import styled.css 9 | import styled.styledDiv 10 | 11 | private fun formatter(value: Number?): ReactElement { 12 | return buildElement { +"$value%" } 13 | } 14 | 15 | fun RBuilder.tipFormatter() { 16 | styledDiv { 17 | css { +SliderStyles.tipFormatter } 18 | div { 19 | slider { 20 | attrs.tipFormatter = ::formatter 21 | } 22 | slider { 23 | attrs.tipFormatter = null 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/space/Split.kt: -------------------------------------------------------------------------------- 1 | package samples.space 2 | 3 | import antd.divider.divider 4 | import antd.space.space 5 | import antd.typography.typographyLink 6 | import react.RBuilder 7 | import react.buildElement 8 | import styled.css 9 | import styled.styledDiv 10 | 11 | private fun RBuilder.spaceSplit() { 12 | space { 13 | attrs { 14 | split = buildElement { 15 | divider { 16 | attrs.type = "vertical" 17 | } 18 | } 19 | } 20 | typographyLink { +"Link" } 21 | typographyLink { +"Link" } 22 | typographyLink { +"Link" } 23 | } 24 | } 25 | 26 | fun RBuilder.split() { 27 | styledDiv { 28 | css { +SpaceStyles.split } 29 | spaceSplit() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/spin/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.spin 2 | 3 | import antd.spin.spin 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.basic() { 9 | styledDiv { 10 | css { +SpinStyles.basic } 11 | spin {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/spin/CustomIndicator.kt: -------------------------------------------------------------------------------- 1 | package samples.spin 2 | 3 | import antd.icon.loadingOutlined 4 | import antd.spin.spin 5 | import kotlinext.js.js 6 | import react.RBuilder 7 | import react.buildElement 8 | import styled.css 9 | import styled.styledDiv 10 | 11 | private val antIcon = buildElement { 12 | loadingOutlined { 13 | attrs{ 14 | style = js { fontSize = 24 } 15 | spin = true 16 | } 17 | } 18 | } 19 | 20 | fun RBuilder.customIndicator() { 21 | styledDiv { 22 | css { +SpinStyles.customIndicator } 23 | spin { 24 | attrs.indicator = antIcon 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/spin/Inside.kt: -------------------------------------------------------------------------------- 1 | package samples.spin 2 | 3 | import antd.spin.spin 4 | import kotlinx.html.classes 5 | import react.RBuilder 6 | import react.dom.div 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.inside() { 11 | styledDiv { 12 | css { +SpinStyles.inside } 13 | div { 14 | attrs.classes = setOf("example") 15 | spin {} 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/spin/Size.kt: -------------------------------------------------------------------------------- 1 | package samples.spin 2 | 3 | import antd.spin.spin 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.size() { 9 | styledDiv { 10 | css { +SpinStyles.size } 11 | spin { 12 | attrs.size = "small" 13 | } 14 | spin {} 15 | spin { 16 | attrs.size = "large" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/spin/Tip.kt: -------------------------------------------------------------------------------- 1 | package samples.spin 2 | 3 | import antd.alert.alert 4 | import antd.spin.spin 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.tip() { 10 | styledDiv { 11 | css { +SpinStyles.tip } 12 | spin { 13 | attrs.tip = "Loading..." 14 | alert { 15 | attrs { 16 | message = "Alert message title" 17 | description = "Further details about the context of this alert." 18 | type = "info" 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/steps/SmallSize.kt: -------------------------------------------------------------------------------- 1 | package samples.steps 2 | 3 | import antd.steps.step 4 | import antd.steps.steps 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.smallSize() { 10 | styledDiv { 11 | css { +StepsStyles.smallSize } 12 | steps { 13 | attrs { 14 | size = "small" 15 | current = 1 16 | } 17 | step { 18 | attrs.title = "Finished" 19 | } 20 | step { 21 | attrs.title = "In Progress" 22 | } 23 | step { 24 | attrs.title = "Waiting" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/switch/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.switch 2 | 3 | import antd.switch.SwitchChangeEventHandler 4 | import antd.switch.switch 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | private val handleChange: SwitchChangeEventHandler = { checked, _ -> 10 | console.log("switch to $checked") 11 | } 12 | 13 | fun RBuilder.basic() { 14 | styledDiv { 15 | css { +SwitchStyles.basic } 16 | switch { 17 | attrs { 18 | defaultChecked = true 19 | onChange = handleChange 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/switch/Loading.kt: -------------------------------------------------------------------------------- 1 | package samples.switch 2 | 3 | import antd.switch.switch 4 | import react.RBuilder 5 | import react.dom.br 6 | import react.dom.div 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.loading() { 11 | styledDiv { 12 | css { +SwitchStyles.loading } 13 | div { 14 | switch { 15 | attrs { 16 | loading = true 17 | defaultChecked = true 18 | } 19 | } 20 | br {} 21 | switch { 22 | attrs { 23 | size = "small" 24 | loading = true 25 | } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/switch/Size.kt: -------------------------------------------------------------------------------- 1 | package samples.switch 2 | 3 | import antd.switch.switch 4 | import react.RBuilder 5 | import react.dom.br 6 | import react.dom.div 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | fun RBuilder.size() { 11 | styledDiv { 12 | css { +SwitchStyles.size } 13 | div { 14 | switch { 15 | attrs.defaultChecked = true 16 | } 17 | br {} 18 | switch { 19 | attrs { 20 | size = "small" 21 | defaultChecked = true 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/timeline/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.timeline 2 | 3 | import antd.timeline.timeline 4 | import antd.timeline.timelineItem 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.basic() { 10 | styledDiv { 11 | css { +TimelineStyles.basic } 12 | timeline { 13 | timelineItem { +"Create a services site 2015-09-01" } 14 | timelineItem { +"Solve initial network problems 2015-09-01" } 15 | timelineItem { +"Technical testing 2015-09-01" } 16 | timelineItem { +"Network problems being solved 2015-09-01" } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/timepicker/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.timepicker 2 | 3 | import antd.timepicker.timePicker 4 | import moment.Moment 5 | import moment.moment 6 | import react.RBuilder 7 | import styled.css 8 | import styled.styledDiv 9 | 10 | private fun handleChange(time: Moment, timeString: String) { 11 | console.log(time, timeString) 12 | } 13 | 14 | fun RBuilder.basic() { 15 | styledDiv { 16 | css { +TimePickerStyles.basic } 17 | timePicker { 18 | attrs { 19 | onChange = ::handleChange 20 | defaultOpenValue = moment("00:00:00", "HH:mm:ss") 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/timepicker/Disabled.kt: -------------------------------------------------------------------------------- 1 | package samples.timepicker 2 | 3 | import antd.timepicker.timePicker 4 | import moment.moment 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.disabled() { 10 | styledDiv { 11 | css { +TimePickerStyles.disabled } 12 | timePicker { 13 | attrs { 14 | defaultValue = moment("12:08:23", "HH:mm:ss") 15 | disabled = true 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/timepicker/HideColumn.kt: -------------------------------------------------------------------------------- 1 | package samples.timepicker 2 | 3 | import antd.timepicker.timePicker 4 | import moment.moment 5 | import react.RBuilder 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | private val timeFormat = "HH:mm" 10 | 11 | fun RBuilder.hideColumn() { 12 | styledDiv { 13 | css { +TimePickerStyles.hideColumn } 14 | timePicker { 15 | attrs { 16 | defaultValue = moment("12:08", timeFormat) 17 | format = timeFormat 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/timepicker/IntervalOptions.kt: -------------------------------------------------------------------------------- 1 | package samples.timepicker 2 | 3 | import antd.timepicker.timePicker 4 | import react.RBuilder 5 | import styled.css 6 | import styled.styledDiv 7 | 8 | fun RBuilder.intervalOptions() { 9 | styledDiv { 10 | css { +TimePickerStyles.intervalOptions } 11 | timePicker { 12 | attrs { 13 | minuteStep = 15 14 | secondStep = 10 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/tooltip/Basic.kt: -------------------------------------------------------------------------------- 1 | package samples.tooltip 2 | 3 | import antd.tooltip.tooltip 4 | import react.RBuilder 5 | import react.dom.span 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.basic() { 10 | styledDiv { 11 | css { +TooltipStyles.basic } 12 | tooltip { 13 | attrs.title = "prompt text" 14 | span { +"Tooltip will show when mouse enter." } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/typography/Title.kt: -------------------------------------------------------------------------------- 1 | package samples.typography 2 | 3 | import antd.typography.typographyTitle 4 | import react.RBuilder 5 | import react.dom.div 6 | import styled.css 7 | import styled.styledDiv 8 | 9 | fun RBuilder.title() { 10 | styledDiv { 11 | css { +TypographyStyles.title } 12 | div { 13 | typographyTitle { +"h1. Ant Design" } 14 | typographyTitle { 15 | attrs.level = 2 16 | +"h2. Ant Design" 17 | } 18 | typographyTitle { 19 | attrs.level = 3 20 | +"h3. Ant Design" 21 | } 22 | typographyTitle { 23 | attrs.level = 4 24 | +"h4. Ant Design" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/kotlin/samples/upload/Directory.kt: -------------------------------------------------------------------------------- 1 | package samples.upload 2 | 3 | import antd.button.button 4 | import antd.icon.uploadOutlined 5 | import antd.upload.UploadComponent 6 | import antd.upload.upload 7 | import react.RBuilder 8 | import styled.css 9 | import styled.styledDiv 10 | 11 | fun RBuilder.directory() { 12 | styledDiv { 13 | css { +UploadStyles.directory } 14 | upload> { 15 | attrs { 16 | action = "//jsonplaceholder.typicode.com/posts/" 17 | directory = true 18 | } 19 | button { 20 | uploadOutlined {} 21 | +"Upload Directory" 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxiadenine/kotlin-js-wrappers/e0017a108b36025630c354c7663256347e867251/kotlin-antd/antd-samples/src/main/resources/favicon.ico -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Kotlin Ant Design 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /kotlin-antd/antd-samples/src/main/resources/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Kotlin Ant Design", 3 | "name": "Kotlin Ant Design Samples", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/gradle.properties: -------------------------------------------------------------------------------- 1 | description=Kotlin/JS wrapper for Ant Design 2 | author=Samuel Garcia -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/Types.kt: -------------------------------------------------------------------------------- 1 | package antd 2 | 3 | typealias Key = Any /* String | Number */ 4 | typealias ReactText = Any /* String | Number */ 5 | typealias ReactChild = Any /* ReactElement | ReactText */ 6 | typealias ReactFragment = Any /* Object | ReactNodeArray */ 7 | typealias ReactNode = Any /* ReactChild | ReactFragment | ReactPortal | Boolean */ 8 | typealias RefCallback = (instance: T?) -> Unit 9 | typealias Ref = Any /* RefCallback | RefObject */ 10 | typealias LegacyRef = Any /* String | Ref */ 11 | typealias ReactInstance = Any /* Component | Element */ 12 | 13 | external interface ReactNodeArray 14 | 15 | external interface RefObject { 16 | val current: T? 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/affix/AffixDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.affix 2 | 3 | import react.* 4 | 5 | fun RBuilder.affix(handler: RHandler) = child(AffixComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/alert/AlertDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.alert 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.alert(handler: RHandler) = child(AlertComponent::class, handler) 7 | fun RBuilder.errorBoundary(handler: RHandler) = child(AlertComponent.ErrorBoundary, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/alert/ErrorBoundary.kt: -------------------------------------------------------------------------------- 1 | package antd.alert 2 | 3 | import react.* 4 | 5 | external interface ErrorBoundaryComponent : ComponentClass 6 | 7 | external interface ErrorBoundaryProps : Props { 8 | var message: ReactNode? 9 | var description: ReactNode? 10 | } 11 | 12 | external interface ErrorBoundaryState : State { 13 | var error: Error? 14 | var info: ErrorBoundaryStateInfo 15 | } 16 | 17 | external interface ErrorBoundaryStateInfo { 18 | var componentStack: String? 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/anchor/AnchorContext.kt: -------------------------------------------------------------------------------- 1 | package antd.anchor 2 | 3 | import react.Context 4 | 5 | external val anchorContext: Context 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/anchor/AnchorDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.anchor 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.anchor(handler: RHandler) = child(AnchorComponent::class, handler) 7 | fun RBuilder.anchorLink(hanler: RHandler) = child(AnchorComponent.Link, jsObject {}, hanler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/anchor/AnchorLink.kt: -------------------------------------------------------------------------------- 1 | package antd.anchor 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface AnchorLinkComponent : ComponentClass 7 | 8 | external interface AnchorLinkProps : Props { 9 | var prefixCls: String? 10 | var href: String 11 | var title: ReactNode 12 | var children: ReactNode? 13 | var className: String? 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/anchor/AnchorTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.anchor 2 | 3 | typealias AnchorContainer = Any /* HTMLElement | Window */ 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/autocomplete/AutoComplete.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/auto-complete") 2 | @file:JsNonModule 3 | 4 | package antd.autocomplete 5 | 6 | import antd.RefAttributes 7 | import antd.select.* 8 | import react.* 9 | 10 | @JsName("default") 11 | external object AutoCompleteComponent : Component { 12 | val Option: OptionComponent 13 | 14 | override fun render(): ReactElement? 15 | } 16 | 17 | external interface AutoCompleteProps : InternalSelectProps, RefAttributes, Props { 18 | var dataSource: Array? 19 | } 20 | 21 | external interface DataSourceItemObject { 22 | var value: String 23 | var text: String 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/autocomplete/AutoCompleteDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.autocomplete 2 | 3 | import react.* 4 | 5 | fun RBuilder.autoComplete(handler: RHandler) = child(AutoCompleteComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/autocomplete/AutoCompleteTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.autocomplete 2 | 3 | typealias DataSourceItemType = Any /* DataSourceItemObject | ReactNode */ 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/avatar/AvatarDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.avatar 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | fun RBuilder.avatar(handler: RHandler) = child(AvatarComponent::class, handler) 7 | fun RBuilder.avatarGroup(handler: RHandler) = child(AvatarComponent.Group, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/avatar/AvatarTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.avatar 2 | 3 | typealias AvatarSize = Any /* "large" | "small" | "default" | Number */ 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/avatar/Group.kt: -------------------------------------------------------------------------------- 1 | package antd.avatar 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface GroupComponent : ComponentClass 7 | 8 | external interface GroupProps : Props { 9 | var className: String? 10 | var children: ReactNode? 11 | var style: dynamic 12 | var prefixCls: String? 13 | var maxCount: Number? 14 | var maxStyle: dynamic 15 | var maxPopoverPlacement: String? /* "top" | "bottom" */ 16 | var size: AvatarSize? 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/avatar/SizeContext.kt: -------------------------------------------------------------------------------- 1 | package antd.avatar 2 | 3 | import react.* 4 | 5 | external val sizeContextProvider: ComponentClass 6 | 7 | external val sizeContext: Context 8 | 9 | external interface SizeContextProps : Props { 10 | var size: AvatarSize? 11 | } 12 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/backtop/BackTop.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/back-top") 2 | @file:JsNonModule 3 | 4 | package antd.backtop 5 | 6 | import antd.* 7 | import antd.ReactNode 8 | import org.w3c.dom.* 9 | import react.* 10 | 11 | @JsName("default") 12 | external object BackTopComponent : Component { 13 | override fun render(): ReactElement? 14 | } 15 | 16 | external interface BackTopProps : Props { 17 | var visibilityHeight: Number? 18 | var onClick: MouseEventHandler? 19 | var target: (() -> Any /* HTMLElement | Window | Document */)? 20 | var prefixCls: String? 21 | var children: ReactNode? 22 | var className: String? 23 | var style: dynamic 24 | var duration: Number? 25 | var visible: Boolean? 26 | } 27 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/backtop/BackTopDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.backtop 2 | 3 | import react.* 4 | 5 | fun RBuilder.backTop(handler: RHandler) = child(BackTopComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/badge/BadgeDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.badge 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | fun RBuilder.badge(handler: RHandler) = child(BadgeComponent::class, handler) 7 | fun RBuilder.badgeRibbon(handler: RHandler) = child(BadgeComponent.Ribbon, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/badge/BadgeTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.badge 2 | 3 | typealias PresetStatusColorType = String /* "success" | "processing" | "error" | "default" | "warning */ 4 | typealias PresetColorType = String /* "pink" | "red" | "yellow" | "orange" | "cyan" | "green" | "blue" | "purple" | "geekblue" | "magenta" | "volcano" | "gold" | "lime" */ 5 | 6 | typealias RibbonPlacement = String /* "start" | "end" */ 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/badge/Ribbon.kt: -------------------------------------------------------------------------------- 1 | package antd.badge 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface RibbonComponent : ComponentClass 7 | 8 | external interface RibbonProps : Props { 9 | var className: String? 10 | var prefixCls: String? 11 | var style: dynamic 12 | var text: ReactNode? 13 | var color: PresetColorType? 14 | var children: ReactNode? 15 | var placement: RibbonPlacement? 16 | } 17 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/badge/ScrollNumber.kt: -------------------------------------------------------------------------------- 1 | package antd.badge 2 | 3 | import react.* 4 | 5 | external object ScrollNumberComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface ScrollNumberProps : Props { 10 | var prefixCls: String? 11 | var className: String? 12 | var count: Any? /* String | Number */ 13 | var children: ReactElement? 14 | var component: String? 15 | var onAnimated: Function? 16 | var style: dynamic 17 | var title: Any? /* String | Number */ 18 | var show: Boolean 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/breadcrumb/BreadcrumbDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.breadcrumb 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.breadcrumb(handler: RHandler) = child(BreadcrumbComponent::class, handler) 7 | fun RBuilder.breadcrumbItem(handler: RHandler) = child(BreadcrumbComponent.Item, jsObject {}, handler) 8 | fun RBuilder.breadcrumbSeparator(handler: RHandler) = child(BreadcrumbComponent.Separator, jsObject {}, handler) 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/breadcrumb/BreadcrumbItem.kt: -------------------------------------------------------------------------------- 1 | package antd.breadcrumb 2 | 3 | import antd.* 4 | import antd.ReactNode 5 | import antd.dropdown.DropdownProps 6 | import react.* 7 | 8 | external interface BreadcrumbItemComponent : ComponentClass 9 | 10 | external interface BreadcrumbItemProps : Props { 11 | var prefixCls: String? 12 | var separator: ReactNode? 13 | var href: String? 14 | var overlay: Any? /* String | ReactElement */ 15 | var dropdownProps: DropdownProps? 16 | var onClick: MouseEventHandler? 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/breadcrumb/BreadcrumbSeparator.kt: -------------------------------------------------------------------------------- 1 | package antd.breadcrumb 2 | 3 | import react.* 4 | 5 | external interface BreadcrumbSeparatorComponent : ComponentClass 6 | 7 | external interface BreadcrumbSeparatorProps : Props 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/button/ButtonDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.button 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.button(handler: RHandler) = child(ButtonComponent::class, handler) 7 | fun RBuilder.buttonGroup(handler: RHandler) = child(ButtonComponent.Group, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/button/ButtonGroup.kt: -------------------------------------------------------------------------------- 1 | package antd.button 2 | 3 | import antd.configprovider.SizeType 4 | import react.* 5 | 6 | external interface ButtonGroupComponent : ComponentClass 7 | 8 | external interface ButtonGroupProps : Props { 9 | var size: SizeType? 10 | var style: dynamic 11 | var className: String? 12 | var prefixCls: String? 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/button/ButtonTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.button 2 | 3 | typealias ButtonType = String /* "default" | "primary" | "ghost" | "dashed" | "link" | "text" */ 4 | typealias ButtonShape = String /* "circle" | "round" */ 5 | typealias ButtonHTMLType = String /* "submit" | "button" | "reset" */ 6 | typealias LegacyButtonType = Any /* ButtonType | "danger" */ 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/button/LoadingIcon.kt: -------------------------------------------------------------------------------- 1 | package antd.button 2 | 3 | import react.* 4 | 5 | external object LoadingIconComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface LoadingIconProps : Props { 10 | var prefixCls: String 11 | var existIcon: Boolean 12 | var loading: Any? /* Boolean | Object */ 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/calendar/CalendarDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.calendar 2 | 3 | import moment.Moment 4 | import react.* 5 | 6 | fun RBuilder.calendar(handler: RHandler>) = child(CalendarComponent::class, handler) 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/calendar/Header.kt: -------------------------------------------------------------------------------- 1 | package antd.calendar 2 | 3 | import react.* 4 | 5 | external class CalendarHeaderComponent : Component, State> { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface CalendarHeaderProps : Props { 10 | var prefixCls: String 11 | var value: DateType 12 | var validRange: Array? 13 | var generateConfig: GenerateConfig 14 | var locale: Locale 15 | var mode: CalendarMode 16 | var fullscreen: Boolean 17 | var onChange: (date: DateType) -> Unit 18 | var onModeChange: (mode: CalendarMode) -> Unit 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/card/CardDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.card 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.card(handler: RHandler) = child(CardComponent::class, handler) 7 | fun RBuilder.cardGrid(handler: RHandler) = child(CardComponent.Grid, jsObject {}, handler) 8 | fun RBuilder.cardMeta(handler: RHandler) = child(CardComponent.Meta, jsObject {}, handler) 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/card/CardTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.card 2 | 3 | typealias CardType = String /* "inner" */ 4 | typealias CardSize = String /* "default" | "small" */ 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/card/Grid.kt: -------------------------------------------------------------------------------- 1 | package antd.card 2 | 3 | import react.* 4 | 5 | external interface CardGridComponent : ComponentClass 6 | 7 | external interface CardGridProps : Props { 8 | var prefixCls: String? 9 | var className: String? 10 | var hoverable: Boolean? 11 | var style: dynamic 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/card/Meta.kt: -------------------------------------------------------------------------------- 1 | package antd.card 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface CardMetaComponent : ComponentClass 7 | 8 | external interface CardMetaProps : Props { 9 | var prefixCls: String? 10 | var style: dynamic 11 | var className: String? 12 | var avatar: ReactNode? 13 | var title: ReactNode? 14 | var description: ReactNode? 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/carousel/CarouselDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.carousel 2 | 3 | import react.* 4 | 5 | fun RBuilder.carousel(handler: RHandler) = child(CarouselComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/carousel/CarouselTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.carousel 2 | 3 | typealias CarouselEffect = String /* "scrollx" | "fade" */ 4 | typealias DotPosition = String /* "top" | "bottom" | "left" | "right" */ 5 | 6 | typealias SwipeDirection = String /* "left" | "down" | "right" | "up" */ 7 | typealias LazyLoadTypes = String /* "ondemand" | "progressive" */ 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/cascader/CascaderDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.cascader 2 | 3 | import react.* 4 | 5 | fun RBuilder.cascader(handler: RHandler) = child(CascaderComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/cascader/CascaderTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.cascader 2 | 3 | typealias CascaderValueType = Array 4 | typealias CascaderExpandTrigger = String /* "click" | "hover" */ 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/checkbox/CheckboxDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.checkbox 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.checkbox(handler: RHandler) = child(CheckboxComponent::class, handler) 7 | fun RBuilder.checkboxGroup(handler: RHandler) = child(CheckboxComponent.Group, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/checkbox/CheckboxTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.checkbox 2 | 3 | typealias CheckboxValueType = Any /* String | Number | Boolean */ 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/collapse/CollapseDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.collapse 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.collapse(handler: RHandler) = child(CollapseComponent::class, handler) 7 | fun RBuilder.collapsePanel(handler: RHandler) = child(CollapseComponent.Panel, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/collapse/CollapsePanel.kt: -------------------------------------------------------------------------------- 1 | package antd.collapse 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface CollapsePanelComponent : ComponentClass 7 | 8 | external interface CollapsePanelProps : Props { 9 | var key: Any /* String | Number */ 10 | var header: ReactNode 11 | var disabled: Boolean? 12 | var className: String? 13 | var style: dynamic 14 | var showArrow: Boolean? 15 | var prefixCls: String? 16 | var forceRender: Boolean? 17 | var id: String? 18 | var extra: ReactNode? 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/collapse/CollapseTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.collapse 2 | 3 | typealias ExpandIconPosition = String /* "left" | "right" */ 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/comment/Comment.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/comment") 2 | @file:JsNonModule 3 | 4 | package antd.comment 5 | 6 | import antd.ReactNode 7 | import react.* 8 | 9 | @JsName("default") 10 | external object CommentComponent : Component { 11 | override fun render(): ReactElement? 12 | } 13 | 14 | external interface CommentProps : Props { 15 | var actions: Array? 16 | var author: ReactNode? 17 | var avatar: ReactNode? 18 | var className: String? 19 | var content: ReactNode 20 | var children: ReactNode 21 | var prefixCls: String? 22 | var style: dynamic 23 | var datetime: ReactNode? 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/comment/CommentDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.comment 2 | 3 | import react.* 4 | 5 | fun RBuilder.comment(handler: RHandler) = child(CommentComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/configprovider/ConfigProviderDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.configprovider 2 | 3 | import react.* 4 | 5 | fun RBuilder.configProvider(handler: RHandler) = child(ConfigProviderComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/configprovider/ConfigProviderTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.configprovider 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | typealias SizeType = String /* "small" | "middle" | "large" */ 7 | typealias DirectionType = String /* "ltr" | "rtl" */ 8 | typealias RenderEmptyHandler = (componentName: String?) -> ReactNode 9 | 10 | typealias IReactComponent

= ComponentClass

11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/configprovider/SizeContext.kt: -------------------------------------------------------------------------------- 1 | package antd.configprovider 2 | 3 | import react.* 4 | 5 | external val sizeContext: Context 6 | 7 | external object SizeContextProvider : Component { 8 | override fun render(): ReactElement? 9 | } 10 | 11 | external interface SizeContextProps : Props { 12 | var size: SizeType? 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/datepicker/DatePickerTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.datepicker 2 | 3 | import antd.ReactNode 4 | 5 | typealias AlignPoint = String 6 | 7 | typealias PanelMode = String /* "time" | "date" | "week" | "month" | "quarter" | "year" | "decade" */ 8 | 9 | typealias DisabledTime = (date: DateType?) -> DisabledTimes 10 | typealias OnPanelChange = (value: DateType, mode: PanelMode) -> Unit 11 | typealias RangeValue = Array 12 | 13 | typealias DateRender = (currentDate: DateType, today: DateType) -> ReactNode 14 | typealias MonthCellRender = (currentDate: DateType, locale: Locale) -> ReactNode 15 | typealias RangeDateRender = (currentDate: DateType, today: DateType, info: RangeInfo) -> ReactNode 16 | 17 | typealias RangeType = String /* "start" | "end" */ 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/datepicker/MonthPicker.kt: -------------------------------------------------------------------------------- 1 | package antd.datepicker 2 | 3 | import moment.Moment 4 | import react.* 5 | 6 | external interface MonthPickerComponent : ComponentClass 7 | 8 | external interface MonthPickerProps : PickerDateProps, Props 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/datepicker/QuarterPicker.kt: -------------------------------------------------------------------------------- 1 | package antd.datepicker 2 | 3 | import moment.Moment 4 | import react.* 5 | 6 | external interface QuarterPickerComponent : ComponentClass 7 | 8 | external interface QuarterPickerProps : PickerTimeProps, Props 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/datepicker/TimePicker.kt: -------------------------------------------------------------------------------- 1 | package antd.datepicker 2 | 3 | import moment.Moment 4 | import react.* 5 | 6 | external interface TimePickerComponent : ComponentClass 7 | 8 | external interface TimePickerProps : PickerTimeProps, Props 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/datepicker/WeekPicker.kt: -------------------------------------------------------------------------------- 1 | package antd.datepicker 2 | 3 | import moment.Moment 4 | import react.* 5 | 6 | external interface WeekPickerComponent : ComponentClass 7 | 8 | external interface WeekPickerProps : PickerDateProps, Props -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/datepicker/YearPicker.kt: -------------------------------------------------------------------------------- 1 | package antd.datepicker 2 | 3 | import moment.Moment 4 | import react.* 5 | 6 | external interface YearPickerComponent : ComponentClass 7 | 8 | external interface YearPickerProps : PickerDateProps, Props 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/descriptions/Cell.kt: -------------------------------------------------------------------------------- 1 | package antd.descriptions 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external object CellComponent : Component { 7 | override fun render(): ReactElement? 8 | } 9 | 10 | external interface CellProps : Props { 11 | var itemPrefixCls: String 12 | var span: Number 13 | var className: String? 14 | var component: String 15 | var style: dynamic 16 | var bordered: Boolean? 17 | var label: ReactNode? 18 | var content: ReactNode? 19 | var colon: Boolean? 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/descriptions/DescriptionsDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.descriptions 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.descriptions(handler: RHandler) = child(DescriptionsComponent::class, handler) 7 | fun RBuilder.descriptionsItem(handler: RHandler) = child(DescriptionsComponent.Item, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/descriptions/Item.kt: -------------------------------------------------------------------------------- 1 | package antd.descriptions 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface DescriptionsItemComponent : ComponentClass 7 | 8 | external interface DescriptionsItemProps : Props { 9 | var prefixCls: String? 10 | var className: String? 11 | var label: ReactNode? 12 | var children: ReactNode? 13 | var span: Number? 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/descriptions/Row.kt: -------------------------------------------------------------------------------- 1 | package antd.descriptions 2 | 3 | import react.* 4 | 5 | external object RowComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface RowProps : Props { 10 | var prefixCls: String 11 | var vertical: Boolean 12 | var row: ReactElement 13 | var bordered: Boolean? 14 | var colon: Boolean 15 | var index: Number 16 | } 17 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/divider/Divider.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/divider") 2 | @file:JsNonModule 3 | 4 | package antd.divider 5 | 6 | import antd.ReactNode 7 | import react.* 8 | 9 | @JsName("default") 10 | external object DividerComponent : Component { 11 | override fun render(): ReactElement? 12 | } 13 | 14 | external interface DividerProps : Props { 15 | var prefixCls: String? 16 | var type: String? /* "horizontal" | "vertical" */ 17 | var orientation: String? /* "left" | "right" | "center" */ 18 | var className: String? 19 | var children: ReactNode? 20 | var dashed: Boolean? 21 | var style: dynamic 22 | var plain: Boolean? 23 | } 24 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/divider/DividerDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.divider 2 | 3 | import react.* 4 | 5 | fun RBuilder.divider(handler: RHandler) = child(DividerComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/drawer/DrawerDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.drawer 2 | 3 | import react.* 4 | 5 | fun RBuilder.drawer(handler: RHandler) = child(DrawerComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/drawer/DrawerTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.drawer 2 | 3 | import org.w3c.dom.* 4 | 5 | typealias PlacementType = String /* "top" | "right" | "bottom" | "left" */ 6 | 7 | typealias EventType = Any /* KeyboardEvent | MouseEvent | MouseEvent */ 8 | typealias GetContainerFunc = () -> HTMLElement 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/dropdown/DropdownButton.kt: -------------------------------------------------------------------------------- 1 | package antd.dropdown 2 | 3 | import antd.* 4 | import antd.ReactNode 5 | import antd.button.* 6 | import org.w3c.dom.* 7 | import react.* 8 | 9 | external interface DropdownButtonComponent : ComponentClass 10 | 11 | external interface DropdownButtonProps : ButtonGroupProps, DropdownProps { 12 | var type: DropdownButtonType? 13 | var htmlType: ButtonHTMLType? 14 | override var disabled: Boolean? 15 | var onClick: MouseEventHandler? 16 | var icon: ReactNode? 17 | var href: String? 18 | var children: ReactNode? 19 | var title: String? 20 | var buttonsRender: ((buttons: Array) -> Array)? 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/dropdown/DropdownDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.dropdown 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.dropdown(handler: RHandler) = child(DropdownComponent::class, handler) 7 | fun RBuilder.dropdownButton(handler: RHandler) = child(DropdownComponent.Button, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/dropdown/DropdownTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.dropdown 2 | 3 | import react.* 4 | 5 | typealias Placement = String /* "topLeft" | "topCenter" | "topRight" | "bottomLeft" | "bottomCenter" | "bottomRight" */ 6 | typealias OverlayFunc = () -> ReactElement 7 | 8 | typealias DropdownButtonType = String /* "primary" | "ghost" | "dashed" */ 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/empty/Empty.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/empty") 2 | @file:JsNonModule 3 | 4 | package antd.empty 5 | 6 | import antd.ReactNode 7 | import react.* 8 | 9 | @JsName("default") 10 | external object EmptyComponent : Component { 11 | val PRESENTED_IMAGE_DEFAULT: ReactNode 12 | val PRESENTED_IMAGE_SIMPLE: ReactNode 13 | 14 | override fun render(): ReactElement? 15 | } 16 | 17 | external interface EmptyProps : Props { 18 | var prefixCls: String? 19 | var className: String? 20 | var style: dynamic 21 | var imageStyle: dynamic 22 | var image: ReactNode? 23 | var description: ReactNode? 24 | var children: ReactNode? 25 | } 26 | 27 | external interface TransferLocale { 28 | var description: String 29 | } 30 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/empty/EmptyDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.empty 2 | 3 | import react.* 4 | 5 | fun RBuilder.empty(handler: RHandler) = child(EmptyComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/empty/Simple.kt: -------------------------------------------------------------------------------- 1 | package antd.empty 2 | 3 | import react.* 4 | 5 | external object SimpleComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface SimpleProps : Props 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/form/FormDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.form 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.form(handler: RHandler>) = child(FormComponent::class, handler) 7 | fun RBuilder.formItem(handler: RHandler>) = child(FormComponent.Item, jsObject {}, handler) 8 | fun RBuilder.formList(handler: RHandler) = child(FormComponent.List, jsObject {}, handler) 9 | fun RBuilder.formErrorList(handler: RHandler) = child(FormComponent.ErrorList, jsObject {}, handler) 10 | fun RBuilder.formProvider(handler: RHandler) = child(FormComponent.Provider, jsObject {}, handler) 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/form/FormErrorList.kt: -------------------------------------------------------------------------------- 1 | package antd.form 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface FormErrorListComponent : ComponentClass 7 | 8 | external interface FormErrorListProps : Props { 9 | var errors: Array? 10 | var help: ReactNode? 11 | var onDomErrorVisibleChange: ((visible: Boolean) -> Unit)? 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/form/FormItemInput.kt: -------------------------------------------------------------------------------- 1 | package antd.form 2 | 3 | import antd.grid.* 4 | import antd.ReactNode 5 | import react.* 6 | 7 | external interface FormItemInputComponent : ComponentClass 8 | 9 | external interface FormItemInputProps : FormItemInputBaseProps, FormItemInputMiscProps, Props 10 | 11 | external interface FormItemInputBaseProps { 12 | var wrapperCol: ColProps? 13 | var help: ReactNode? 14 | var extra: ReactNode? 15 | var status: ValidateStatus? 16 | } 17 | 18 | external interface FormItemInputMiscProps { 19 | var prefixCls: String? 20 | var children: Any /* ReactNode */ 21 | var errors: Array 22 | var hasFeedback: Boolean? 23 | var validateStatus: ValidateStatus? 24 | var onDomErrorVisibleChange: (visible: Boolean) -> Unit 25 | } 26 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/grid/GridDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.grid 2 | 3 | import react.* 4 | 5 | fun RBuilder.col(handler: RHandler) = child(ColComponent::class, handler) 6 | fun RBuilder.row(handler: RHandler) = child(RowComponent::class, handler) 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/grid/GridTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.grid 2 | 3 | typealias ColSpanType = Any /* Number | String */ 4 | typealias FlexType = Any /* Number | "none" | "auto" | String */ 5 | 6 | typealias Gutter = Any /* Number | ScreenSizeMap */ 7 | typealias RowAligns = String /* "top" | "middle" | "bottom" | "stretch" */ 8 | typealias RowJustify = String /* "start" | "end" | "center" | "space-around" | "space-between" */ 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/grid/Hooks.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/grid/hooks/useBreakpoint") 2 | @file:JsNonModule 3 | 4 | package antd.grid 5 | 6 | import antd.ScreenMap 7 | 8 | @JsName("default") 9 | external val useBreakpoint: () -> ScreenMap 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/grid/Row.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/grid/row") 2 | @file:JsNonModule 3 | 4 | package antd.grid 5 | 6 | import antd.* 7 | import org.w3c.dom.* 8 | import react.* 9 | 10 | @JsName("default") 11 | external object RowComponent : Component { 12 | override fun render(): ReactElement? 13 | } 14 | 15 | external interface RowProps : HTMLAttributes, RefAttributes, Props { 16 | var gutter: Any? /* Gutter | Array */ 17 | var align: RowAligns? 18 | var justify: RowJustify? 19 | var prefixCls: String? 20 | var wrap: Boolean? 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/grid/RowContext.kt: -------------------------------------------------------------------------------- 1 | package antd.grid 2 | 3 | import react.Context 4 | 5 | external val rowContext: Context 6 | 7 | external interface RowContextState { 8 | var gutter: Array? 9 | var wrap: Boolean? 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/icon/IconDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.icon 2 | 3 | import react.* 4 | 5 | fun RBuilder.icon(handler: RHandler) = child(IconComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/icon/IconFont.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("@ant-design/icons/lib") 2 | @file:JsNonModule 3 | 4 | package antd.icon 5 | 6 | import react.* 7 | 8 | @JsName("createFromIconfontCN") 9 | external fun createFromIconfontCN(options: CustomIconOptions? = definedExternally): ComponentClass 10 | 11 | external interface CustomIconOptions { 12 | var scriptUrl: Any /* String | Array */ 13 | var extraCommonProps: dynamic 14 | } 15 | 16 | external interface IconFontProps : IconBaseProps, Props { 17 | var type: String 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/icon/IconTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.icon 2 | 3 | typealias ThemeType = String /* "filled" | "outlined" | "twoTone" */ 4 | typealias TwoToneColor = Any /* String | Array */ 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/image/ImageDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.image 2 | 3 | import react.RBuilder 4 | import react.RHandler 5 | 6 | fun RBuilder.image(handler: RHandler) = child(ImageComponent::class, handler) 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/input/Group.kt: -------------------------------------------------------------------------------- 1 | package antd.input 2 | 3 | import antd.* 4 | import antd.ReactNode 5 | import org.w3c.dom.* 6 | import react.* 7 | 8 | external interface GroupComponent : ComponentClass 9 | 10 | external interface GroupProps : Props { 11 | var className: String? 12 | var size: String? /* "large" | "small" | "default" */ 13 | var children: ReactNode? 14 | var style: dynamic 15 | var onMouseEnter: MouseEventHandler? 16 | var onMouseLeave: MouseEventHandler? 17 | var onFocus: FocusEventHandler? 18 | var onBlur: FocusEventHandler? 19 | var prefixCls: String? 20 | var compact: Boolean? 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/input/InputDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.input 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.input(handler: RHandler) = child(InputComponent::class, handler) 7 | fun RBuilder.inputGroup(handler: RHandler) = child(InputComponent.Group, jsObject {}, handler) 8 | fun RBuilder.search(handler: RHandler) = child(InputComponent.Search, jsObject {}, handler) 9 | fun RBuilder.textArea(handler: RHandler) = child(InputComponent.TextArea, jsObject {}, handler) 10 | fun RBuilder.password(handler: RHandler) = child(InputComponent.Password, jsObject {}, handler) 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/input/InputTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.input 2 | 3 | typealias ClearableInputType = Array 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/input/Password.kt: -------------------------------------------------------------------------------- 1 | package antd.input 2 | 3 | import antd.RefAttributes 4 | import antd.ReactNode 5 | import react.* 6 | 7 | external interface PasswordComponent : ComponentClass 8 | 9 | external interface PasswordProps : InputProps, RefAttributes { 10 | val inputPrefixCls: String? 11 | val action: String? 12 | var visibilityToggle: Boolean? 13 | var iconRender: ((visible: Boolean) -> ReactNode)? 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/input/Search.kt: -------------------------------------------------------------------------------- 1 | package antd.input 2 | 3 | import antd.RefAttributes 4 | import antd.ReactNode 5 | import react.* 6 | 7 | external interface SearchComponent : ComponentClass 8 | 9 | external interface SearchProps : InputProps, RefAttributes { 10 | var inputPrefixCls: String? 11 | var onSearch: ((value: String, event: Any? /* ChangeEvent | MouseEvent | KeyboardEvent */) -> Unit)? 12 | var enterButton: ReactNode? 13 | var loading: Boolean? 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/inputnumber/InputNumberDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.inputnumber 2 | 3 | import react.* 4 | 5 | fun RBuilder.inputNumber(handler: RHandler) = child(InputNumberComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/layout/LayoutDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.layout 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.layout(handler: RHandler) = child(LayoutComponent::class, handler) 7 | fun RBuilder.header(handler: RHandler) = child(LayoutComponent.Header, jsObject {}, handler) 8 | fun RBuilder.footer(handler: RHandler) = child(LayoutComponent.Footer, jsObject {}, handler) 9 | fun RBuilder.content(handler: RHandler) = child(LayoutComponent.Content, jsObject {}, handler) 10 | fun RBuilder.sider(handler: RHandler) = child(LayoutComponent.Sider, jsObject {}, handler) 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/layout/LayoutTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.layout 2 | 3 | typealias CollapseType = String /* "clickTrigger" | "responsive" */ 4 | typealias SiderTheme = String /* "light" | "dark" */ 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/list/ListDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.list 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | inline fun > RBuilder.list(noinline handler: RHandler>) = child(LC::class, handler) 7 | fun RBuilder.listItem(handler: RHandler) = child(ListComponent.Item, jsObject {}, handler) 8 | fun RBuilder.listItemMeta(handler: RHandler) = child(ListComponent.Item.Meta, jsObject {}, handler) 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/list/ListTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.list 2 | 3 | typealias ColumnCount = Number /* 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24 */ 4 | typealias ColumnType = String /* "gutter" | "column" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" */ 5 | typealias ListSize = String /* "small" | "default" | "large" */ 6 | typealias ListItemLayout = String /* "horizontal" | "vertical" */ 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/ArEG.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/ar_EG") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val arEG: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/BgEG.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/bg_EG") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val bgEG: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/CaES.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/ca_ES") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val caES: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/CsCZ.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/cs_CZ") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val csCZ: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/DaDK.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/da_DK") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val daDK: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/DeDE.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/de_DE") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val deDE: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/ElGR.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/el_GR") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val elGR: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/EnGB.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/en_GB") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val enGB: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/EnUS.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/en_US") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val enUS: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/EsES.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/es_ES") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val esES: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/EtEE.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/et_EE") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val etEE: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/FaIR.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/fa_IR") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val faIR: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/FiFI.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/fi_FI") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val fiFI: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/FrBE.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/fr_BE") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val frBE: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/FrFR.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/fr_FR") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val frFR: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/HeIL.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/he_IL") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val heIL: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/HiIN.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/hi_IN") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val hiIN: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/HrHR.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/hr_HR") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val hrHR: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/HuHU.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/hu_HU") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val huHU: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/IdID.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/id_ID") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val idID: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/IsIS.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/is_IS") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val isIS: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/ItIT.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/it_IT") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val itIT: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/JaJP.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/ja_JP") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val jaJP: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/KnIN.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/kn_IN") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val knIN: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/KoKR.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/ko_KR") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val koKR: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/KuIQ.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/ku_IQ") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val kuIQ: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/LocaleProviderDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.localeprovider 2 | 3 | import react.* 4 | 5 | fun RBuilder.localeProvider(handler: RHandler) = child(LocaleProviderComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/LocaleReceiver.kt: -------------------------------------------------------------------------------- 1 | package antd.localeprovider 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external object LocaleReceiverComponent : Component { 7 | override fun render(): ReactElement? 8 | } 9 | 10 | external interface LocaleReceiverProps : Props { 11 | var componentName: String? 12 | var defaultLocale: Any? /* Object | Function */ 13 | var children: (locale: dynamic, localeCode: String?, fullLocale: dynamic) -> ReactNode 14 | } 15 | 16 | external interface LocaleInterface 17 | 18 | external interface LocaleReceiverContext { 19 | var antLocale: LocaleInterface? 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/LvLV.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/lv_LV") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val lvLV: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/MnMN.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/mn_MN") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val mnMN: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/NbNO.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/nb_NO") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val nbNO: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/NeNP.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/ne_NP") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val neNP: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/NlBE.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/nl_BE") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val nlBE: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/NlNL.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/nl_NL") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val nlNL: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/PlPL.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/pl_PL") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val plPL: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/PtBR.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/pt_BR") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val ptBR: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/PtPT.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/pt_PT") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val ptPT: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/RuRU.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/ru_RU") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val ruRU: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/SkSK.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/sk_SK") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val skSK: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/SlSI.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/sl_SI") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val slSI: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/SrRS.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/sr_RS") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val srRS: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/SvSE.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/sv_SE") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val svSE: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/ThTH.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/th_TH") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val thTH: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/TrTR.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/tr_TR") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val trTR: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/UkUA.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/uk_UA") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val ukUA: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/ViVN.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/vi_VN") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val viVN: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/ZhCN.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/zh_CN") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val zhCN: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/localeprovider/ZhTW.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/locale-provider/zh_TW") 2 | @file:JsNonModule 3 | 4 | package antd.localeprovider 5 | 6 | @JsName("default") 7 | external val zhTW: Locale 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/mentions/MentionsDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.mentions 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.mentions(handler: RHandler) = child(MentionsComponent::class, handler) 7 | fun RBuilder.option(handler: RHandler) = child(MentionsComponent.Option, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/mentions/MentionsTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.mentions 2 | 3 | typealias Placement = String /* "top" | "bottom" */ 4 | typealias Direction = String /* "ltr" | "rtl" */ 5 | 6 | typealias FilterOption = (input: String, value: OptionProps) -> Boolean 7 | typealias ValidateSearch = (text: String, props: RcMentionsProps) -> Boolean 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/mentions/Option.kt: -------------------------------------------------------------------------------- 1 | package antd.mentions 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface OptionComponent : ComponentClass 7 | 8 | external interface OptionProps : RcOptionProps, Props { 9 | override var value: String? 10 | override var children: ReactNode? 11 | } 12 | 13 | external interface RcOptionProps { 14 | var value: String? 15 | var key: String? 16 | var disabled: Boolean? 17 | var children: ReactNode? 18 | var className: String? 19 | var style: dynamic 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/menu/Divider.kt: -------------------------------------------------------------------------------- 1 | package antd.menu 2 | 3 | import react.* 4 | 5 | external interface DividerComponent : ComponentClass 6 | 7 | external interface DividerProps : Props { 8 | var className: String? 9 | var rootPrefixCls: String? 10 | var style: dynamic 11 | var disabled: Boolean 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/menu/MenuContext.kt: -------------------------------------------------------------------------------- 1 | package antd.menu 2 | 3 | import antd.configprovider.DirectionType 4 | import react.Context 5 | 6 | external val menuContext: Context 7 | 8 | external interface MenuContextProps { 9 | var inlineCollapsed: Boolean 10 | var antdMenuTheme: MenuTheme? 11 | var direction: DirectionType? 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/menu/MenuDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.menu 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.menu(handler: RHandler) = child(MenuComponent::class, handler) 7 | fun RBuilder.divider(handler: RHandler) = child(MenuComponent.Divider, jsObject {}, handler) 8 | fun RBuilder.menuItem(handler: RHandler) = child(MenuComponent.Item, jsObject {}, handler) 9 | fun RBuilder.subMenu(handler: RHandler) = child(MenuComponent.SubMenu, jsObject {}, handler) 10 | fun RBuilder.menuItemGroup(handler: RHandler) = child(MenuComponent.ItemGroup, jsObject {}, handler) 11 | 12 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/menu/MenuItemGroup.kt: -------------------------------------------------------------------------------- 1 | package antd.menu 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface MenuItemGroupComponent : ComponentClass 7 | 8 | external interface MenuItemGroupProps : Props { 9 | var renderMenuItem: ((item: ReactElement, index: Number, key: String) -> ReactElement)? 10 | var index: Number? 11 | var className: String? 12 | var subMenuKey: String? 13 | var rootPrefixCls: String? 14 | var title: ReactNode? 15 | var onClick: MenuClickEventHandler? 16 | var direction: String? /* "ltr" | "rtl" */ 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/message/Hooks.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/message/hooks/useMessage") 2 | @file:JsNonModule 3 | 4 | package antd.message 5 | 6 | import antd.notification.RcNoticeContent 7 | import antd.notification.RcNotificationInstance 8 | 9 | @JsName("default") 10 | external fun createUseMessage( 11 | getRcNotificationInstance: (args: ArgsProps, callback: (info: CreateUseMessageCallbackInfo) -> Unit) -> Unit, 12 | getRCNoticeProps: (args: ArgsProps, prefixCls: String) -> RcNoticeContent 13 | ): () -> Array 14 | 15 | external interface CreateUseMessageCallbackInfo { 16 | var prefixCls: String 17 | var instance: RcNotificationInstance 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/message/MessageTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.message 2 | 3 | typealias NoticeType = String /* "info" | "success" | "error" | "warning" | "loading" */ 4 | 5 | typealias ConfigContent = Any /* ReactElement | String */ 6 | typealias ConfigDuration = Any /* Number | () -> Unit */ 7 | typealias JointContent = Any /* ConfigContent | ArgsProps */ 8 | typealias ConfigOnClose = () -> Unit 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/modal/ActionButton.kt: -------------------------------------------------------------------------------- 1 | package antd.modal 2 | 3 | import antd.button.* 4 | import react.* 5 | 6 | external object ActionButtonComponent : Component { 7 | override fun render(): ReactElement? 8 | } 9 | 10 | external interface ActionButtonProps : Props { 11 | var type: LegacyButtonType? 12 | var actionFn: ((args: Array) -> Any /* Any | Promise */)? 13 | var closeModal: Function 14 | var autoFocus: Boolean? 15 | var prefixCls: String 16 | var buttonProps: ButtonProps? 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/modal/ConfirmDialog.kt: -------------------------------------------------------------------------------- 1 | package antd.modal 2 | 3 | import react.* 4 | 5 | external object ConfirmDialogComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface ConfirmDialogProps : ModalFuncProps, Props { 10 | var afterClose: (() -> Unit)? 11 | var close: (args: Array) -> Unit 12 | override var autoFocusButton: String? /* "ok" | "cancel" */ 13 | var rootPrefixCls: String? 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/modal/Hooks.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/modal/useModal") 2 | @file:JsNonModule 3 | 4 | package antd.modal 5 | 6 | @JsName("default") 7 | external fun useModal(): Array 8 | 9 | external interface HookModalProps { 10 | var afterClose: () -> Unit 11 | var config: ModalFuncProps 12 | } 13 | 14 | external interface HookModalRef { 15 | var destroy: () -> Unit 16 | var update: (config: ModalFuncProps) -> Unit 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/modal/ModalDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.modal 2 | 3 | import react.* 4 | 5 | fun RBuilder.modal(handler: RHandler) = child(ModalComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/modal/ModalTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.modal 2 | 3 | typealias ModalFunc = (props: ModalFuncProps) -> ModalFuncResult 4 | typealias ConfigUpdate = Any /* ModalFuncProps | (prevConfig: ModalFuncProps) -> ModalFuncProps */ 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/notification/Hooks.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/notification/hooks/useNotification") 2 | @file:JsNonModule 3 | 4 | package antd.notification 5 | 6 | @JsName("default") 7 | external fun createUseNotification( 8 | getNotificationInstance: (args: ArgsProps, callback: (info: CreateUseNotificationCasllbackInfo) -> Unit) -> Unit, 9 | getRCNoticeProps: (args: ArgsProps, prefixCls: String) -> RcNoticeContent 10 | ): () -> Array 11 | 12 | external interface CreateUseNotificationCasllbackInfo { 13 | var prefixCls: String 14 | var instance: RcNotificationInstance 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/notification/NotificationTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.notification 2 | 3 | import org.w3c.dom.HTMLDivElement 4 | 5 | typealias NotificationPlacement = String /* "topLeft" | "topRight" | "bottomLeft" | "bottomRight" */ 6 | typealias IconType = String /* "success" | "info" | "error" | "warning" */ 7 | 8 | typealias NoticeFunc = (noticeProps: RcNoticeContent) -> Unit 9 | typealias HolderReadyCallback = (div: HTMLDivElement, noticeProps: RcNoticeProps) -> Unit 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/pageheader/PageHeaderDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.pageheader 2 | 3 | import react.* 4 | 5 | fun RBuilder.pageHeader(handler: RHandler) = child(PageHeaderComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/pagination/MiniSelect.kt: -------------------------------------------------------------------------------- 1 | package antd.pagination 2 | 3 | import antd.select.* 4 | import react.* 5 | 6 | external object MiniSelectComponent : Component { 7 | val Option: OptionComponent 8 | 9 | override fun render(): ReactElement? 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/pagination/PaginationDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.pagination 2 | 3 | import react.* 4 | 5 | fun RBuilder.pagination(handler: RHandler) = child(PaginationComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/pagination/PaginationTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.pagination 2 | 3 | typealias PaginationPosition = String /* "top" | "bottom" | "both" */ 4 | typealias PaginationLocale = Any 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/popconfirm/PopconfirmDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.popconfirm 2 | 3 | import react.* 4 | 5 | fun RBuilder.popconfirm(handler: RHandler) = child(PopconfirmComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/popover/Popover.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/popover") 2 | @file:JsNonModule 3 | 4 | package antd.popover 5 | 6 | import antd.RefAttributes 7 | import antd.tooltip.* 8 | import react.* 9 | 10 | @JsName("default") 11 | external object PopoverComponent : Component { 12 | override fun render(): ReactElement? 13 | } 14 | 15 | external interface PopoverProps : AbstractTooltipProps, RefAttributes, Props { 16 | var title: Any? /* ReactNode | RenderFunction */ 17 | var content: Any? /* ReactNode | RenderFunction */ 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/popover/PopoverDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.popover 2 | 3 | import react.* 4 | 5 | fun RBuilder.popover(handler: RHandler) = child(PopoverComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/progress/Circle.kt: -------------------------------------------------------------------------------- 1 | package antd.progress 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external object CircleComponent : Component { 7 | override fun render(): ReactElement? 8 | } 9 | 10 | external interface CircleProps : ProgressProps { 11 | override var prefixCls: String? 12 | var children: ReactNode 13 | var progressStatus: String 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/progress/Line.kt: -------------------------------------------------------------------------------- 1 | package antd.progress 2 | 3 | import antd.configprovider.DirectionType 4 | import antd.ReactNode 5 | import react.* 6 | 7 | external object LineComponent : Component { 8 | override fun render(): ReactElement? 9 | } 10 | 11 | external interface LineProps : ProgressProps { 12 | override var prefixCls: String? 13 | var direction: DirectionType? 14 | var children: ReactNode 15 | } 16 | 17 | external val sortGradient: (gradients: ProgressGradient) -> Any 18 | external val handleGradient: (strokeColor: ProgressGradient) -> HandleGradientResult 19 | 20 | external interface HandleGradientResult { 21 | var backgroundImage: String 22 | } 23 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/progress/ProgressDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.progress 2 | 3 | import react.* 4 | 5 | fun RBuilder.progress(handler: RHandler) = child(ProgressComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/progress/ProgressTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.progress 2 | 3 | typealias ProgressType = String /* "line" | "circle" | "dashboard" */ 4 | typealias ProgressStatus = String /* "normal" | "exception" | "active" | "success" */ 5 | typealias ProgressSize = String /* "default" | "small" */ 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/progress/Steps.kt: -------------------------------------------------------------------------------- 1 | package antd.progress 2 | 3 | import react.* 4 | 5 | external object StepsComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface StepsProps : ProgressProps { 10 | override var steps: Number? 11 | override var size: ProgressSize? 12 | override var strokeColor: dynamic /* String */ 13 | override var trailColor: String? 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/radio/Context.kt: -------------------------------------------------------------------------------- 1 | package antd.radio 2 | 3 | import react.* 4 | 5 | external val radioGroupContext: Context 6 | external val radioGroupContextProvider: Provider 7 | 8 | external interface RadioGroupContextProps { 9 | var onChange: (e: RadioChangeEvent) -> Unit 10 | var value: Any 11 | var disabled: Boolean? 12 | var name: String? 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/radio/RadioButton.kt: -------------------------------------------------------------------------------- 1 | package antd.radio 2 | 3 | import antd.RefAttributes 4 | import antd.checkbox.* 5 | import react.* 6 | 7 | external interface RadioButtonComponent : ComponentClass 8 | 9 | external interface RadioButtonProps : AbstractCheckboxProps, RefAttributes, Props 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/radio/RadioDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.radio 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.radio(handler: RHandler) = child(RadioComponent::class, handler) 7 | fun RBuilder.radioGroup(handler: RHandler) = child(RadioComponent.Group, jsObject {}, handler) 8 | fun RBuilder.radioButton(handler: RHandler) = child(RadioComponent.Button, jsObject {}, handler) 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/radio/RadioTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.radio 2 | 3 | typealias RadioGroupButtonStyle = String /* "outline" | "solid" */ 4 | typealias RadioGroupOptionType = String /* "default" | "button" */ 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/rate/RateDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.rate 2 | 3 | import react.* 4 | 5 | fun RBuilder.rate(handler: RHandler) = child(RateComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/result/NoFound.kt: -------------------------------------------------------------------------------- 1 | package antd.result 2 | 3 | import react.* 4 | 5 | external object NoFoundComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface NoFoundProps : Props 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/result/ResultDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.result 2 | 3 | import react.* 4 | 5 | fun RBuilder.result(handler: RHandler) = child(ResultComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/result/ResultTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.result 2 | 3 | typealias ExceptionStatusType = Any /* Number | String | 403 | 404 | 500 | "403" | "404" | "500" */ 4 | typealias ResultStatusType = Any /* ExceptionStatusType | "success" | "error" | "info" | "warning" */ 5 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/result/ServerError.kt: -------------------------------------------------------------------------------- 1 | package antd.result 2 | 3 | import react.* 4 | 5 | external object ServerErrorComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface ServerErrorProps : Props 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/result/Unauthorized.kt: -------------------------------------------------------------------------------- 1 | package antd.result 2 | 3 | import react.* 4 | 5 | external object UnauthorizedComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface UnauthorizedProps : Props 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/select/Option.kt: -------------------------------------------------------------------------------- 1 | package antd.select 2 | 3 | import antd.Key 4 | import antd.ReactNode 5 | import react.* 6 | 7 | external interface OptionComponent : ComponentClass 8 | 9 | external interface OptionProps : OptionCoreData, Props { 10 | override var children: ReactNode? 11 | } 12 | 13 | external interface OptionCoreData { 14 | var key: Key? 15 | var disabled: Boolean? 16 | var value: Key 17 | var title: String? 18 | var className: String? 19 | var style: dynamic 20 | var label: ReactNode? 21 | var children: ReactNode? 22 | } 23 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/select/OptionGroup.kt: -------------------------------------------------------------------------------- 1 | package antd.select 2 | 3 | import antd.Key 4 | import antd.ReactNode 5 | import react.* 6 | 7 | external interface OptionGroupComponent : ComponentClass 8 | 9 | external interface OptionGroupProps : OptionGroupData, Props { 10 | var children: ReactNode? 11 | } 12 | 13 | external interface OptionGroupData { 14 | var key: Key? 15 | var label: ReactNode? 16 | var options: Array 17 | var className: String? 18 | var style: dynamic 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/select/SelectDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.select 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | inline fun > RBuilder.select(noinline handler: RHandler>) = child(SC::class, handler) 7 | fun RBuilder.option(handler: RHandler) = child(SelectComponent.Option, jsObject {}, handler) 8 | fun RBuilder.optGroup(handler: RHandler) = child(SelectComponent.OptGroup, jsObject {}, handler) 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/Avatar.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import react.* 4 | 5 | external interface SkeletonAvatarComponent : ComponentClass 6 | 7 | external interface SkeletonAvatarProps : SkeletonElementProps, Props { 8 | override var shape: String? /* "circle" | "square" */ 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/Button.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import react.* 4 | 5 | external interface SkeletonButtonComponent : ComponentClass 6 | 7 | external interface SkeletonButtonProps : SkeletonElementProps, Props { 8 | override var size: dynamic /* "large" | "small" | "default" */ 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/Element.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import react.* 4 | 5 | external interface SkeletonElementComponent : ComponentClass 6 | 7 | external interface SkeletonElementProps : Props { 8 | var prefixCls: String? 9 | var className: String? 10 | var style: dynamic 11 | var size: Any? /* "large" | "small" | "default" | Number */ 12 | var shape: String? /* "circle" | "square" | "round" */ 13 | var active: Boolean? 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/Image.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import react.* 4 | 5 | external interface SkeletonImageComponent : ComponentClass 6 | 7 | external interface SkeletonImageProps : SkeletonElementProps, Props 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/Input.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import react.* 4 | 5 | external interface SkeletonInputComponent : ComponentClass 6 | 7 | external interface SkeletonInputProps : SkeletonElementProps, Props { 8 | override var size: dynamic /* "large" | "small" | "default" */ 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/Paragraph.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import react.* 4 | 5 | external interface SkeletonParagraphComponent : ComponentClass 6 | 7 | external interface SkeletonParagraphProps : Props { 8 | var prefixCls: String? 9 | var className: String? 10 | var style: dynamic 11 | var width: Any? /* WidthUnit | Array */ 12 | var rows: Number? 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/SkeletonDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | fun RBuilder.skeleton(handler: RHandler) = child(SkeletonComponent::class, handler) 7 | fun RBuilder.skeletonButton(handler: RHandler) = child(SkeletonComponent.Button, jsObject {}, handler) 8 | fun RBuilder.skeletonAvatar(handler: RHandler) = child(SkeletonComponent.Avatar, jsObject {}, handler) 9 | fun RBuilder.skeletonInput(handler: RHandler) = child(SkeletonComponent.Input, jsObject {}, handler) 10 | fun RBuilder.skeletonImage(handler: RHandler) = child(SkeletonComponent.Image, jsObject {}, handler) 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/SkeletonTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | typealias WidthUnit = Any? /* Number | String */ 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/skeleton/Title.kt: -------------------------------------------------------------------------------- 1 | package antd.skeleton 2 | 3 | import react.* 4 | 5 | external interface SkeletonTitleComponent : ComponentClass 6 | 7 | external interface SkeletonTitleProps : Props { 8 | var prefixCls: String? 9 | var className: String? 10 | var style: dynamic 11 | var width: Any? /* Number | String */ 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/slider/SliderDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.slider 2 | 3 | import react.* 4 | 5 | fun RBuilder.slider(handler: RHandler) = child(SliderComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/slider/SliderTooltip.kt: -------------------------------------------------------------------------------- 1 | package antd.slider 2 | 3 | import antd.RefAttributes 4 | import antd.tooltip.TooltipPropsWithOverlay 5 | import antd.tooltip.TooltipPropsWithTitle 6 | import react.* 7 | 8 | external object SliderTooltipComponent : Component { 9 | override fun render(): ReactElement? 10 | } 11 | 12 | external interface SliderTooltipProps : TooltipPropsWithOverlay, TooltipPropsWithTitle, RefAttributes, Props 13 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/slider/SliderTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.slider 2 | 3 | import react.* 4 | 5 | typealias HandleGeneratorFn = (config: HandleGeneratorFnConfig) -> ReactElement 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/space/Item.kt: -------------------------------------------------------------------------------- 1 | package antd.space 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external object ItemComponent : Component { 7 | override fun render(): ReactElement? 8 | } 9 | 10 | external interface ItemProps : Props { 11 | var className: String 12 | var children: ReactNode 13 | var index: Number 14 | var direction: String? /* "horizontal" | "vertical" */ 15 | var size: Any? /* SizeType | Number */ 16 | var marginDirection: String /* "marginLeft" | "marginRight" */ 17 | var split: ReactNode? 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/space/Space.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/space") 2 | @file:JsNonModule 3 | 4 | package antd.space 5 | 6 | import antd.ReactNode 7 | import react.* 8 | 9 | @JsName("default") 10 | external object SpaceComponent : Component { 11 | override fun render(): ReactElement? 12 | } 13 | 14 | external interface SpaceProps : Props { 15 | var prefixCls: String? 16 | var className: String? 17 | var style: dynamic 18 | var size: Any? /* SizeType | Number */ 19 | var direction: String? /* "horizontal" | "vertical" */ 20 | var align: String? /*"start" | "end" | "center" | "baseline" */ 21 | var split: ReactNode? 22 | } 23 | 24 | external val lastIndexContext: Context 25 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/space/SpaceDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.space 2 | 3 | import react.RBuilder 4 | import react.RHandler 5 | 6 | fun RBuilder.space(handler: RHandler) = child(SpaceComponent::class, handler) 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/spin/Spin.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/spin") 2 | @file:JsNonModule 3 | 4 | package antd.spin 5 | 6 | import react.* 7 | 8 | @JsName("default") 9 | external object SpinComponent : Component { 10 | override fun render(): ReactElement? 11 | } 12 | 13 | external interface SpinProps : Props { 14 | var prefixCls: String? 15 | var className: String? 16 | var spinning: Boolean? 17 | var style: dynamic 18 | var size: SpinSize? 19 | var tip: String? 20 | var delay: Number? 21 | var wrapperClassName: String? 22 | var indicator: SpinIndicator? 23 | } 24 | 25 | external interface SpinState : State { 26 | var spinning: Boolean? 27 | var notCssAnimationSupported: Boolean? 28 | } 29 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/spin/SpinDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.spin 2 | 3 | import react.* 4 | 5 | fun RBuilder.spin(handler: RHandler) = child(SpinComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/spin/SpinTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.spin 2 | 3 | import react.* 4 | 5 | typealias SpinSize = String /* "small" | "default" | "large" */ 6 | typealias SpinIndicator = ReactElement 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/statistic/Countdown.kt: -------------------------------------------------------------------------------- 1 | package antd.statistic 2 | 3 | import react.* 4 | 5 | external interface CountdownComponent : ComponentClass 6 | 7 | external interface CountdownProps : StatisticProps { 8 | override var value: CountdownValueType? 9 | var format: String? 10 | var onFinish: (() -> Unit)? 11 | } 12 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/statistic/Number.kt: -------------------------------------------------------------------------------- 1 | package antd.statistic 2 | 3 | import react.* 4 | 5 | external object NumberComponent : Component { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface NumberProps : FormatConfig, Props { 10 | var value: ValueType 11 | } 12 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/statistic/StatisticDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.statistic 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.statistic(handler: RHandler) = child(StatisticComponent::class, handler) 7 | fun RBuilder.countdown(handler: RHandler) = child(StatisticComponent.Countdown, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/statistic/StatisticTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.statistic 2 | 3 | typealias ValueType = Any /* Number | String */ 4 | typealias CountdownValueType = Any /* ValueType | String */ 5 | typealias Formatter = Any /* Boolean | String | "number" | "countdown" | (value: ValueType, config: FormatConfig?) -> ReactNode */ 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/steps/Step.kt: -------------------------------------------------------------------------------- 1 | package antd.steps 2 | 3 | import antd.* 4 | import antd.ReactNode 5 | import org.w3c.dom.* 6 | import react.* 7 | 8 | external interface StepComponent : ComponentClass 9 | 10 | external interface StepProps : Props { 11 | var className: String? 12 | var description: ReactNode? 13 | var icon: ReactNode? 14 | var onClick: MouseEventHandler? 15 | var status: String? /* "wait" | "process" | "finish" | "error" */ 16 | var title: ReactNode? 17 | var subTitle: ReactNode? 18 | var style: dynamic 19 | } 20 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/steps/StepsDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.steps 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.steps(handler: RHandler) = child(StepsComponent::class, handler) 7 | fun RBuilder.step(handler: RHandler) = child(StepsComponent.Step, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/switch/SwitchDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.switch 2 | 3 | import react.* 4 | 5 | fun RBuilder.switch(handler: RHandler) = child(SwitchComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/switch/SwitchTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.switch 2 | 3 | import org.w3c.dom.events.MouseEvent 4 | 5 | typealias SwitchSize = String /* "small" | "default" */ 6 | typealias SwitchChangeEventHandler = (checked: Boolean, event: MouseEvent) -> Unit 7 | typealias SwitchClickEventHandler = SwitchChangeEventHandler 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/table/Column.kt: -------------------------------------------------------------------------------- 1 | package antd.table 2 | 3 | import react.* 4 | 5 | external interface ColumnComponent : ComponentClass> 6 | 7 | external interface ColumnProps : ColumnType, Props { 8 | var children: dynamic 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/table/ColumnGroup.kt: -------------------------------------------------------------------------------- 1 | package antd.table 2 | 3 | import react.* 4 | 5 | external interface ColumnGroupComponent : ComponentClass> 6 | 7 | external interface ColumnGroupProps : ColumnType, Props { 8 | var children: Any /* ReactElement | Array */ 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/table/ExpandIcon.kt: -------------------------------------------------------------------------------- 1 | package antd.table 2 | 3 | import antd.MouseEvent 4 | import org.w3c.dom.HTMLElement 5 | import react.ReactElement 6 | 7 | external fun renderExpandIcon(locale: TableLocale): ReactElement? 8 | 9 | external interface DefaultExpandIconProps { 10 | var prefixCls: String 11 | var onExpand: (record: RecordType, e: MouseEvent) -> Unit 12 | var record: RecordType 13 | var expanded: Boolean 14 | var expandable: Boolean 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/table/Summary.kt: -------------------------------------------------------------------------------- 1 | package antd.table 2 | 3 | import react.* 4 | 5 | external interface Summary { 6 | val Cell: SummaryCellComponent 7 | val Row: SummaryRowComponent 8 | } 9 | 10 | external interface SummaryCellComponent : ComponentClass 11 | 12 | external interface SummaryRowComponent : ComponentClass 13 | 14 | external interface SummaryCellProps : Props { 15 | var className: String? 16 | var children: ReactNode? 17 | var index: Number 18 | var colSpan: Number? 19 | var rowSpan: Number? 20 | var align: AlignType? 21 | } 22 | 23 | external interface SummaryRowProps : Props { 24 | var children: ReactNode? 25 | var className: String? 26 | var style: dynamic 27 | } 28 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/table/TableDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.table 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | inline fun > RBuilder.table(noinline handler: RHandler>) = child(TC::class, handler) 7 | fun RBuilder.tableColumn(handler: RHandler>) = child(TableComponent.Column, jsObject {}, handler) 8 | fun RBuilder.tableColumnGroup(handler: RHandler>) = child(TableComponent.ColumnGroup, jsObject {}, handler) 9 | fun RBuilder.tableSummaryCell(handler: RHandler) = child(TableComponent.Summary.Cell, jsObject {}, handler) 10 | fun RBuilder.tableSummaryRow(handler: RHandler) = child(TableComponent.Summary.Row, jsObject {}, handler) 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tabs/TabPane.kt: -------------------------------------------------------------------------------- 1 | package antd.tabs 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface TabPaneComponent : ComponentClass 7 | 8 | external interface TabPaneProps : Props { 9 | var tab: ReactNode? 10 | var className: String? 11 | var style: dynamic 12 | var disabled: Boolean? 13 | var children: ReactNode? 14 | var forceRender: Boolean? 15 | var closable: Boolean? 16 | var closeIcon: ReactNode? 17 | var prefixCls: String? 18 | var tabKey: String? 19 | var id: String? 20 | var animated: Boolean? 21 | var active: Boolean? 22 | var destroyInactiveTabPane: Boolean? 23 | } 24 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tabs/TabsDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.tabs 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.tabs(handler: RHandler) = child(TabsComponent::class, handler) 7 | fun RBuilder.tabPane(handler: RHandler) = child(TabsComponent.TabPane, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tabs/TabsTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.tabs 2 | 3 | import antd.ReactNode 4 | import kotlinext.js.Record 5 | import react.ReactElement 6 | 7 | typealias TabsType = String /* "line" | "card" | "editable-card" */ 8 | typealias TabsPosition = String /* "top" | "right" | "bottom" | "left" */ 9 | 10 | typealias TabPosition = String /* "top" | "right" | "bottom" | "left" */ 11 | typealias RenderTabBar = (props: Any, DefaultTabBar: dynamic) -> ReactElement 12 | typealias OnTabScroll = (info: OnTabsScrollInfo) -> Unit 13 | typealias TabBarExtraPosition = String /* "left" | "right" */ 14 | typealias TabBarExtraMap = Record 15 | typealias TabBarExtraContent = Any /* ReactNode | TabBarExtraMap */ 16 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tag/CheckableTag.kt: -------------------------------------------------------------------------------- 1 | package antd.tag 2 | 3 | import antd.MouseEvent 4 | import org.w3c.dom.HTMLSpanElement 5 | import react.* 6 | 7 | external interface CheckableTagComponent : ComponentClass 8 | 9 | external interface CheckableTagProps : Props { 10 | var prefixCls: String? 11 | var className: String? 12 | var style: String? 13 | var checked: Boolean 14 | var onChange: ((checked: Boolean) -> Unit)? 15 | var onClick: ((e: MouseEvent) -> Unit)? 16 | } 17 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tag/TagDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.tag 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.tag(handler: RHandler) = child(TagComponent::class, handler) 7 | fun RBuilder.checkableTag(handler: RHandler) = child(TagComponent.CheckableTag, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/timeline/Timeline.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/timeline") 2 | @file:JsNonModule 3 | 4 | package antd.timeline 5 | 6 | import antd.ReactNode 7 | import react.* 8 | 9 | @JsName("default") 10 | external object TimelineComponent : Component { 11 | val Item: TimelineItemComponent 12 | 13 | override fun render(): ReactElement? 14 | } 15 | 16 | external interface TimelineProps : Props { 17 | var prefixCls: String? 18 | var className: String? 19 | var pending: ReactNode? 20 | var pendingDot: ReactNode? 21 | var style: dynamic 22 | var reverse: Boolean? 23 | var mode: String? /* "left" | "alternate" | "right" */ 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/timeline/TimelineDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.timeline 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.timeline(handler: RHandler) = child(TimelineComponent::class, handler) 7 | fun RBuilder.timelineItem(handler: RHandler) = child(TimelineComponent.Item, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/timeline/TimelineItem.kt: -------------------------------------------------------------------------------- 1 | package antd.timeline 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external interface TimelineItemComponent : ComponentClass 7 | 8 | external interface TimelineItemProps : Props { 9 | var prefixCls: String? 10 | var className: String? 11 | var color: String? 12 | var dot: ReactNode? 13 | var pending: Boolean? 14 | var position: String? 15 | var style: dynamic 16 | var label: ReactNode? 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/timepicker/TimePickerDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.timepicker 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | fun RBuilder.timePicker(handler: RHandler) = child(TimePickerComponent::class, handler) 7 | fun RBuilder.rangePicker(handler: RHandler) = child(TimePickerComponent.RangePicker, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tooltip/TooltipDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.tooltip 2 | 3 | import react.* 4 | 5 | fun RBuilder.tooltip(handler: RHandler) = child(TooltipComponent::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tooltip/TooltipTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.tooltip 2 | 3 | import antd.ReactNode 4 | 5 | typealias TooltipPlacement = String /* "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" */ 6 | typealias RenderFunction = () -> ReactNode 7 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tooltip/TriggerTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.tooltip 2 | 3 | typealias AlignPoint = String 4 | typealias StretchType = String 5 | typealias ActionType = String 6 | typealias AnimationType = String 7 | typealias TransitionNameType = String 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/transfer/ListBody.kt: -------------------------------------------------------------------------------- 1 | package antd.transfer 2 | 3 | import react.* 4 | 5 | external class ListBodyComponent : Component, TransferListBodyState> { 6 | override fun render(): ReactElement? 7 | } 8 | 9 | external interface TransferListBodyProps : PartialTransferListProps { 10 | var filteredItems: Array 11 | var filteredRenderItems: Array> 12 | var selectedKeys: Array 13 | } 14 | 15 | external interface TransferListBodyState : State { 16 | var current: Number 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/transfer/ListItem.kt: -------------------------------------------------------------------------------- 1 | package antd.transfer 2 | 3 | import antd.ReactNode 4 | import react.* 5 | 6 | external class TransferListItemComponent : Component, State> { 7 | override fun render(): ReactElement? 8 | } 9 | 10 | external interface ListItemProps : Props { 11 | var renderedText: Any? /* String | Number */ 12 | var renderedEl: ReactNode 13 | var disabled: Boolean? 14 | var checked: Boolean? 15 | var prefixCls: String 16 | var onClick: ((item: RecordType) -> Unit)? 17 | var onRemove: ((item: RecordType) -> Unit)? 18 | var item: RecordType 19 | var showRemove: Boolean? 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/transfer/Operation.kt: -------------------------------------------------------------------------------- 1 | package antd.transfer 2 | 3 | import antd.* 4 | import antd.configprovider.DirectionType 5 | import org.w3c.dom.* 6 | import react.* 7 | 8 | external object TransferOperationComponent : Component { 9 | override fun render(): ReactElement? 10 | } 11 | 12 | external interface TransferOperationProps : Props { 13 | var className: String? 14 | var leftArrowText: String? 15 | var rightArrowText: String? 16 | var moveToLeft: MouseEventHandler? 17 | var moveToRight: MouseEventHandler? 18 | var leftActive: Boolean? 19 | var rightActive: Boolean? 20 | var style: dynamic 21 | var disabled: Boolean? 22 | var direction: DirectionType? 23 | var oneWay: Boolean? 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/transfer/Search.kt: -------------------------------------------------------------------------------- 1 | package antd.transfer 2 | 3 | import antd.* 4 | import org.w3c.dom.* 5 | import react.* 6 | 7 | external object TransferSearchComponent : Component { 8 | override fun render(): ReactElement? 9 | } 10 | 11 | external interface TransferSearchProps : Props { 12 | var prefixCls: String? 13 | var placeholder: String? 14 | var onChange: ((e: FormEvent) -> Unit)? 15 | var handleClear: ((e: MouseEvent) -> Unit)? 16 | var value: String? 17 | var disabled: Boolean? 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/transfer/TransferDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.transfer 2 | 3 | import react.* 4 | 5 | inline fun > RBuilder.transfer(noinline handler: RHandler>) = child(TC::class, handler) 6 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/transfer/TransferTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.transfer 2 | 3 | import antd.ReactNode 4 | 5 | typealias TransferDirection = String /* "left" | "right" */ 6 | typealias RenderResult = Any /* ReactNode | RenderResultObject */ 7 | typealias KeyWiseTransferItem = Any /* TransferItem | KeyWise */ 8 | typealias TransferRender = (item: RecordType) -> RenderResult 9 | typealias SelectAllLabel = Any /* ReactNode | (info: SelectAllLabelInfo) -> ReactNode) */ 10 | typealias PartialTransferListProps = TransferListProps 11 | typealias RenderListFunction = (props: TransferListBodyProps) -> ReactNode 12 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tree/DirectoryTree.kt: -------------------------------------------------------------------------------- 1 | package antd.tree 2 | 3 | import antd.Key 4 | import antd.RefAttributes 5 | import react.* 6 | 7 | external interface DirectoryTreeComponent : ComponentClass 8 | 9 | external interface DirectoryTreeProps : TreeProps, RefAttributes { 10 | var expandAction: ExpandAction 11 | } 12 | 13 | external interface DirectoryTreeState : State { 14 | var expandedKeys: Array? 15 | var selectedKeys: Array? 16 | } 17 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tree/TreeDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.tree 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.tree(handler: RHandler) = child(TreeComponent::class, handler) 7 | fun RBuilder.treeNode(handler: RHandler) = child(TreeComponent.TreeNode, jsObject {}, handler) 8 | fun RBuilder.directoryTree(handler: RHandler) = child(TreeComponent.DirectoryTree, jsObject {}, handler) 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/tree/TreeTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.tree 2 | 3 | typealias IconType = Any /* ReactNode | (props: TreeNodeProps) -> ReactNode */ 4 | typealias NodeElement = Any /* ReactElement | NodeElementSelect */ 5 | typealias NodeInstance = Any /* ComponentClass | NodeElementSelect */ 6 | 7 | typealias TreeNodeNormal = DataNode 8 | typealias ExpandAction = Any /* Boolean | "click" | "doubleClick" */ 9 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/treeselect/TreeNode.kt: -------------------------------------------------------------------------------- 1 | package antd.treeselect 2 | 3 | import antd.Key 4 | import react.* 5 | 6 | external interface TreeNodeComponent : ComponentClass 7 | 8 | external interface TreeNodeProps : DataNode, Props { 9 | override var value: Key? 10 | override var children: Any? 11 | } 12 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/treeselect/TreeSelectDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.treeselect 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | inline fun > RBuilder.treeSelect(noinline handler: RHandler>) = child(TSC::class, handler) 7 | fun RBuilder.treeNode(handler: RHandler) = child(TreeSelectComponent.TreeNode, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/treeselect/TreeSelectTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.treeselect 2 | 3 | typealias RawValue = Any /* String | Number */ 4 | typealias SelectValue = Any /* RawValue | Array | LabeledValue | Array */ 5 | 6 | typealias SelectSource = String /* "option" | "selection" | "input" | "clear" */ 7 | typealias RawValueType = Any /* String | Number */ 8 | typealias DefaultValueType = Any /* RawValueType | Array | LabelValueType | Array */ 9 | typealias CheckedStrategy = String /* "SHOW_ALL" | "SHOW_PARENT" | "SHOW_CHILD" */ 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/Editable.kt: -------------------------------------------------------------------------------- 1 | package antd.typography 2 | 3 | import antd.configprovider.DirectionType 4 | import react.* 5 | 6 | external interface EditableComponent : ComponentClass 7 | 8 | external interface EditableProps : Props { 9 | var prefixCls: String? 10 | var value: String? 11 | var onSave: (value: String) -> Unit 12 | var onCancel: () -> Unit 13 | var className: String? 14 | var style: dynamic 15 | var direction: DirectionType? 16 | var maxLength: Number? 17 | var autoSize: Any? /* Boolean | AutoSizeType */ 18 | } 19 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/Link.kt: -------------------------------------------------------------------------------- 1 | package antd.typography 2 | 3 | import antd.AnchorHTMLAttributes 4 | import antd.RefAttributes 5 | import org.w3c.dom.HTMLAnchorElement 6 | import org.w3c.dom.HTMLElement 7 | import react.* 8 | 9 | external interface LinkComponent : ComponentClass 10 | 11 | external interface LinkProps : BlockProps, AnchorHTMLAttributes, RefAttributes, Props { 12 | override var ellipsis: dynamic /* Boolean */ 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/Paragraph.kt: -------------------------------------------------------------------------------- 1 | package antd.typography 2 | 3 | import react.* 4 | 5 | external interface ParagraphComponent : ComponentClass 6 | 7 | external interface ParagraphProps : BlockProps, Props 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/Text.kt: -------------------------------------------------------------------------------- 1 | package antd.typography 2 | 3 | import react.* 4 | 5 | external interface TextComponent : ComponentClass 6 | 7 | external interface TextProps : BlockProps, Props { 8 | override var ellipsis: dynamic /* Boolean */ 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/Title.kt: -------------------------------------------------------------------------------- 1 | package antd.typography 2 | 3 | import react.* 4 | 5 | external interface TitleComponent : ComponentClass 6 | 7 | external interface TitleProps : BlockProps, Props { 8 | var level: Number? 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/Typography.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("antd/lib/typography") 2 | @file:JsNonModule 3 | 4 | package antd.typography 5 | 6 | import react.* 7 | 8 | @JsName("default") 9 | external object TypographyComponent : Component { 10 | val Text: TextComponent 11 | val Link: LinkComponent 12 | val Title: TitleComponent 13 | val Paragraph: ParagraphComponent 14 | 15 | override fun render(): ReactElement? 16 | } 17 | 18 | external interface TypographyProps : Props { 19 | var id: String? 20 | var prefixCls: String? 21 | var className: String? 22 | var style: dynamic 23 | var children: Any? 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/TypographyDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.typography 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | fun RBuilder.typography(handler: RHandler) = child(TypographyComponent::class, handler) 7 | fun RBuilder.typographyText(handler: RHandler) = child(TypographyComponent.Text, jsObject {}, handler) 8 | fun RBuilder.typographyLink(handler: RHandler) = child(TypographyComponent.Link, jsObject {}, handler) 9 | fun RBuilder.typographyTitle(handler: RHandler) = child(TypographyComponent.Title, jsObject {}, handler) 10 | fun RBuilder.typographyParagraph(handler: RHandler) = child(TypographyComponent.Paragraph, jsObject {}, handler) 11 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/typography/TypographyTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.typography 2 | 3 | typealias BaseType = String /* "secondary" | "success" | "warning" | "danger" */ 4 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/upload/Dragger.kt: -------------------------------------------------------------------------------- 1 | package antd.upload 2 | 3 | import react.* 4 | 5 | external interface DraggerComponent : ComponentClass 6 | 7 | external interface DraggerProps : UploadProps { 8 | var height: Number? 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/upload/UploadDsl.kt: -------------------------------------------------------------------------------- 1 | package antd.upload 2 | 3 | import kotlinext.js.* 4 | import react.* 5 | 6 | inline fun > RBuilder.upload(noinline handler: RHandler>) = child(UC::class, handler) 7 | fun RBuilder.uploadDragger(handler: RHandler) = child(UploadComponent.Dragger, jsObject {}, handler) 8 | -------------------------------------------------------------------------------- /kotlin-antd/src/main/kotlin/antd/upload/UploadTypes.kt: -------------------------------------------------------------------------------- 1 | package antd.upload 2 | 3 | import antd.ReactNode 4 | import antd.progress.ProgressProps 5 | import react.ReactElement 6 | import kotlin.js.* 7 | 8 | typealias UploadFileStatus = String /* "error" | "success" | "done" | "uploading" | "removed" */ 9 | typealias UploadType = String /* "drag" | "select" */ 10 | typealias UploadListType = String /* "text" | "picture" | "picture-card" */ 11 | typealias UploadListProgressProps = ProgressProps 12 | typealias ItemRender = (originNode: ReactElement, file: UploadFile, fileList: Array>?) -> ReactNode 13 | typealias PreviewFileHandler = (file: Any /* File | Blob */) -> Promise 14 | typealias TransformFileHandler = (file: RcFile) -> Any /* String | Blob | File | Promise */ 15 | -------------------------------------------------------------------------------- /kotlin-moment/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | `wrapper-publish` 4 | } 5 | 6 | dependencies { 7 | api(npmPackage("moment")) 8 | } 9 | -------------------------------------------------------------------------------- /kotlin-moment/gradle.properties: -------------------------------------------------------------------------------- 1 | description=Kotlin/JS wrapper for Moment.js 2 | author=Samuel Garcia -------------------------------------------------------------------------------- /kotlin-moment/moment-samples/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | implementation(project(":kotlin-moment")) 7 | 8 | implementation(kotlinWrapperDependency("styled")) 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-moment/moment-samples/src/main/kotlin/samples/Main.kt: -------------------------------------------------------------------------------- 1 | package samples 2 | 3 | import kotlinx.browser.* 4 | import react.dom.* 5 | 6 | fun main() { 7 | render(document.getElementById("root")!!) { 8 | app() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-moment/moment-samples/src/main/resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxiadenine/kotlin-js-wrappers/e0017a108b36025630c354c7663256347e867251/kotlin-moment/moment-samples/src/main/resources/favicon.ico -------------------------------------------------------------------------------- /kotlin-moment/moment-samples/src/main/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Kotlin Moment 10 | 11 | 12 |

13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /kotlin-moment/moment-samples/src/main/resources/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Kotlin Moment", 3 | "name": "Kotlin Moment Samples", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-moment/src/main/kotlin/moment/Constructor.kt: -------------------------------------------------------------------------------- 1 | package moment 2 | 3 | @JsModule("moment") 4 | @JsNonModule 5 | external fun moment(inp: MomentInput? = definedExternally, strict: Boolean? = definedExternally): Moment 6 | 7 | @JsModule("moment") 8 | @JsNonModule 9 | external fun moment( 10 | inp: MomentInput? = definedExternally, 11 | format: MomentFormatSpecification? = definedExternally, 12 | strict: Boolean? = definedExternally 13 | ): Moment 14 | 15 | @JsModule("moment") 16 | @JsNonModule 17 | external fun moment( 18 | inp: MomentInput? = definedExternally, 19 | format: MomentFormatSpecification? = definedExternally, 20 | language: String? = definedExternally, 21 | strict: Boolean? = definedExternally 22 | ): Moment 23 | -------------------------------------------------------------------------------- /kotlin-react-intl/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | api(kotlinWrapperDependency("react")) 7 | 8 | api(npmPackage("react-intl")) 9 | } 10 | 11 | configureKotlinJs() 12 | configurePublication() -------------------------------------------------------------------------------- /kotlin-react-intl/gradle.properties: -------------------------------------------------------------------------------- 1 | description=Kotlin/JS wrapper for React Intl 2 | author=Samuel Garcia -------------------------------------------------------------------------------- /kotlin-react-intl/react-intl-samples/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | implementation(project(":kotlin-react-intl")) 7 | 8 | implementation(kotlinWrapperDependency("react-dom")) 9 | implementation(kotlinWrapperDependency("emotion")) 10 | } 11 | 12 | configureKotlinJs() -------------------------------------------------------------------------------- /kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Main.kt: -------------------------------------------------------------------------------- 1 | package samples 2 | 3 | import dom.Element 4 | import kotlinx.browser.document 5 | import react.create 6 | import react.dom.client.createRoot 7 | 8 | fun main() { 9 | createRoot(document.getElementById("root").unsafeCast()).render(App.create()) 10 | } -------------------------------------------------------------------------------- /kotlin-react-intl/react-intl-samples/src/main/kotlin/samples/Plural.kt: -------------------------------------------------------------------------------- 1 | package samples 2 | 3 | import react.* 4 | import react.dom.html.ReactHTML.button 5 | import reactintl.components.plural.FormattedPlural 6 | import reactintl.components.provider.IntlProvider 7 | 8 | val Plural = FC { 9 | val (dogs, setDogs) = useState(1) 10 | 11 | IntlProvider { 12 | locale = "en" 13 | defaultLocale = "en" 14 | FormattedPlural { 15 | value = dogs 16 | one = ReactNode("I have a unique dog") 17 | other = ReactNode("I have $dogs dogs") 18 | } 19 | button { 20 | onClick = { setDogs(dogs + 1) } 21 | +"Add dogs" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /kotlin-react-intl/react-intl-samples/src/main/resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxiadenine/kotlin-js-wrappers/e0017a108b36025630c354c7663256347e867251/kotlin-react-intl/react-intl-samples/src/main/resources/favicon.ico -------------------------------------------------------------------------------- /kotlin-react-intl/react-intl-samples/src/main/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Kotlin React Intl 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /kotlin-react-intl/react-intl-samples/src/main/resources/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Kotlin React Intl", 3 | "name": "Kotlin React Intl Samples", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/Errors.kt: -------------------------------------------------------------------------------- 1 | package reactintl 2 | 3 | enum class IntlErrorCode { 4 | FORMAT_ERROR, 5 | UNSUPPORTED_FORMATTER, 6 | INVALID_CONFIG, 7 | MISSING_DATA, 8 | MISSING_TRANSLATION 9 | } 10 | 11 | open class IntlError(val code: IntlErrorCode, message: String, exception: Error?) : Error(message, exception) -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/Types.kt: -------------------------------------------------------------------------------- 1 | package reactintl 2 | 3 | typealias OnErrorFn = (err: IntlError) -> Unit 4 | typealias MessageFormatElement = BaseElement /* ArgumentElement | DateElement | LiteralElement | NumberElement | PluralElement | PoundElement | SelectElement | TagElement | TimeElement */ 5 | typealias Skeleton = Any /* NumberSkeleton | DateTimeSkeleton */ 6 | typealias FormatXMLElementFn = (parts: Array) -> R 7 | typealias Locale = String -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/Utils.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("react-intl") 2 | @file:JsNonModule 3 | 4 | package reactintl 5 | 6 | external fun createIntlCache(): IntlCache 7 | external fun createFormatters(cache: IntlCache?): Formatters 8 | external fun getNamedFormat( 9 | formats: CustomFormats, 10 | type: T, 11 | name: String, 12 | onError: OnErrorFn 13 | ): Any? /* IntlNumber.NumberFormatOptions | IntlDateTime.DateTimeFormatOptions | IntlRelativeTime.RelativeTimeFormatOptions */ -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/components/UseIntl.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("react-intl") 2 | @file:JsNonModule 3 | 4 | package reactintl.components 5 | 6 | import reactintl.IntlShape 7 | 8 | @JsName("useIntl") 9 | external fun useIntl(): IntlShape -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/components/list/ListTypes.kt: -------------------------------------------------------------------------------- 1 | package reactintl.components.list 2 | 3 | typealias Part = Any /* LiteralPart | ElementPart | ElementPart */ -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/components/message/MessageTypes.kt: -------------------------------------------------------------------------------- 1 | package reactintl.components.message 2 | 3 | typealias MessageFormatPart = Any /* LiteralPart | ObjectPart */ -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/components/plural/PluralTypes.kt: -------------------------------------------------------------------------------- 1 | package reactintl.components.plural 2 | 3 | typealias IntlLDMLPluralRule = String /* "zero" | "one" | "two" | "few" | "many" | "other" */ 4 | typealias IntlPluralRuleType = String /* "cardinal" | "ordinal" */ -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/components/provider/Provider.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("react-intl") 2 | @file:JsNonModule 3 | 4 | package reactintl.components.provider 5 | 6 | import react.FC 7 | import react.PropsWithChildren 8 | import react.ReactNode 9 | import react.State 10 | import reactintl.IntlCache 11 | import reactintl.IntlConfig 12 | import reactintl.IntlShape 13 | 14 | @JsName("IntlProvider") 15 | external val IntlProvider: FC 16 | 17 | external interface ProviderProps : IntlConfig, PropsWithChildren 18 | 19 | external interface ProviderState : State { 20 | var cache: IntlCache 21 | var intl: IntlShape? 22 | var prevConfig: IntlConfig 23 | } 24 | 25 | external val createIntl: CreateIntlFn -------------------------------------------------------------------------------- /kotlin-react-intl/src/main/kotlin/reactintl/components/provider/ProviderTypes.kt: -------------------------------------------------------------------------------- 1 | package reactintl.components.provider 2 | 3 | import reactintl.IntlCache 4 | 5 | typealias CreateIntlFn = (config: C, cache: IntlCache?) -> S -------------------------------------------------------------------------------- /kotlin-react-responsive/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | api(kotlinWrapperDependency("react")) 7 | 8 | api(npmPackage("react-responsive")) 9 | } 10 | 11 | configureKotlinJs() 12 | configurePublication() -------------------------------------------------------------------------------- /kotlin-react-responsive/gradle.properties: -------------------------------------------------------------------------------- 1 | description=Kotlin/JS wrapper for React Responsive 2 | author=Samuel Garcia -------------------------------------------------------------------------------- /kotlin-react-responsive/react-responsive-samples/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | implementation(project(":kotlin-react-responsive")) 7 | 8 | implementation(kotlinWrapperDependency("react-dom")) 9 | implementation(kotlinWrapperDependency("emotion")) 10 | } 11 | 12 | configureKotlinJs() -------------------------------------------------------------------------------- /kotlin-react-responsive/react-responsive-samples/src/main/kotlin/samples/Main.kt: -------------------------------------------------------------------------------- 1 | package samples 2 | 3 | import dom.Element 4 | import kotlinx.browser.document 5 | import react.create 6 | import react.dom.client.createRoot 7 | 8 | fun main() { 9 | createRoot(document.getElementById("root").unsafeCast()).render(App.create()) 10 | } -------------------------------------------------------------------------------- /kotlin-react-responsive/react-responsive-samples/src/main/resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxiadenine/kotlin-js-wrappers/e0017a108b36025630c354c7663256347e867251/kotlin-react-responsive/react-responsive-samples/src/main/resources/favicon.ico -------------------------------------------------------------------------------- /kotlin-react-responsive/react-responsive-samples/src/main/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Kotlin React Responsive 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /kotlin-react-responsive/react-responsive-samples/src/main/resources/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Kotlin React Responsive", 3 | "name": "Kotlin React Responsive Samples", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } -------------------------------------------------------------------------------- /kotlin-react-responsive/src/main/kotlin/reactresponsive/MediaQueryHooks.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("react-responsive") 2 | @file:JsNonModule 3 | 4 | package reactresponsive 5 | 6 | @JsName("useMediaQuery") 7 | external fun useMediaQuery( 8 | settings: MediaQuerySettings, 9 | device: MediaQueryMatchers? = definedExternally, 10 | callback: ((matches: Boolean) -> Unit)? = definedExternally 11 | ): Boolean 12 | 13 | external interface MediaQuerySettings : MediaQueryAllQueryable { 14 | var query: String? 15 | } -------------------------------------------------------------------------------- /kotlin-react-responsive/src/main/kotlin/reactresponsive/MediaQueryTypes.kt: -------------------------------------------------------------------------------- 1 | package reactresponsive 2 | 3 | typealias MediaQueryType = String /* keyof MediaQueryTypes */ 4 | 5 | typealias MediaQueryMatcherOrientation = String /* "portrait" | "landscape" */ 6 | typealias MediaQueryMatcherScan = String /* "progressive" | "interlace" */ -------------------------------------------------------------------------------- /kotlin-uikit/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | api(npmPackage("uikit")) 7 | } 8 | 9 | configureKotlinJs() 10 | configurePublication() -------------------------------------------------------------------------------- /kotlin-uikit/gradle.properties: -------------------------------------------------------------------------------- 1 | description=Kotlin/JS wrapper for UIkit 2 | author=Samuel Garcia -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Alert.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface AlertComponent : Component { 6 | fun close() 7 | } 8 | 9 | external interface AlertOptions { 10 | var animation: Any? /* Boolean | String */ 11 | var duration: Number? 12 | var selClose: String? 13 | } 14 | 15 | object AlertEvents { 16 | const val beforeHide = "beforehide" 17 | const val hide = "hide" 18 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Countdown.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface CountdownComponent : Component { 6 | fun start() 7 | fun stop() 8 | } 9 | 10 | external interface CountdownOptions { 11 | var date: String? 12 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Cover.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface CoverComponent : Component 6 | 7 | external interface CoverOptions { 8 | var automute: Boolean? 9 | var width: Number? 10 | var height: Number? 11 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Filter.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface FilterComponent : Component 6 | 7 | external interface FilterOptions { 8 | var target: String? 9 | var selActive: Any? /* String | Boolean */ 10 | var animation: Any? /* String | Boolean */ 11 | var duration: Number? 12 | } 13 | 14 | object FilterEvents { 15 | const val beforeFilter = "beforeFilter" 16 | const val afterFilter = "afterFilter" 17 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Form.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface FormComponent : Component 6 | 7 | external interface FormOptions { 8 | var target: Any? /* String | Boolean */ 9 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Grid.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface GridComponent : Component 6 | 7 | external interface GridOptions { 8 | var margin: String? 9 | var firstColumn: String? 10 | var masonry: Boolean? 11 | var parallax: Number? 12 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Height.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface HeightComponent : Component 6 | 7 | external interface HeightOptions { 8 | var target: String? 9 | var row: Boolean? 10 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Icon.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import org.w3c.dom.Element 4 | import uikit.Component 5 | import kotlin.js.Promise 6 | 7 | external interface Icon { 8 | fun add(name: String, svg: Element) 9 | } 10 | 11 | external interface IconComponent : Component { 12 | val svg: Promise 13 | } 14 | 15 | external interface IconOptions { 16 | var icon: String? 17 | var ratio: Number? 18 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Image.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface ImageComponent : Component 6 | 7 | external interface ImageOptions { 8 | var dataSrc: String? 9 | var dataSrcset: String? 10 | var sizes: String? 11 | var width: String? 12 | var height: String? 13 | var offsetTop: String? 14 | var offsetLeft: String? 15 | var target: String? 16 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Leader.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface LeaderComponent : Component 6 | 7 | external interface LeaderOptions { 8 | var fill: String? 9 | var media: Any? /* Number | String */ 10 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Margin.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface MarginComponent : Component 6 | 7 | external interface MarginOptions { 8 | var margin: String? 9 | var firstColumn: String? 10 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Nav.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface NavComponent : Component { 6 | fun toggle(index: Any? /* String | Number | Node */ = definedExternally, animate: Boolean? = definedExternally) 7 | } 8 | 9 | external interface NavOptions { 10 | var targets: String? 11 | var toggle: String? 12 | var content: String? 13 | var collapsible: Boolean? 14 | var multiple: Boolean? 15 | var transition: String? 16 | var animation: String? 17 | var duration: Number? 18 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Navbar.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface NavbarComponent : Component 6 | 7 | external interface NavbarOptions { 8 | var align: String? 9 | var mode: String? 10 | var delayShow: Number? 11 | var delayHide: Number? 12 | var boundary: Any? /* Boolean | String */ 13 | var boundaryAlign: Boolean? 14 | var offset: Number? 15 | var dropbar: Boolean? 16 | var duration: Number? 17 | } 18 | 19 | object NavbarEvents { 20 | const val beforeShow = "beforeshow" 21 | const val show = "show" 22 | const val shown = "shown" 23 | const val beforeHide = "beforehide" 24 | const val hide = "hide" 25 | const val hidden = "hidden" 26 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Notification.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface Notification { 6 | fun closeAll(group: Any? = definedExternally, immediate: Boolean? = definedExternally) 7 | } 8 | 9 | external interface NotificationComponent : Component { 10 | fun close(immediate: Boolean? = definedExternally) 11 | } 12 | 13 | external interface NotificationOptions { 14 | var message: String? 15 | var status: String? 16 | var timeout: Number? 17 | var group: String? 18 | var pos: String? 19 | } 20 | 21 | object NotificationEvents { 22 | const val close = "close" 23 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/OffCanvas.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface OffCanvasComponent : Component { 6 | fun show() 7 | fun hide() 8 | } 9 | 10 | external interface OffCanvasOptions { 11 | var mode: String? 12 | var flip: Boolean? 13 | var overlay: Boolean? 14 | var escClose: Boolean? 15 | var bgClose: Boolean? 16 | var container: String? 17 | } 18 | 19 | object OffCanvasEvents { 20 | const val beforeShow = "beforeshow" 21 | const val show = "show" 22 | const val shown = "shown" 23 | const val beforeHide = "beforehide" 24 | const val hide = "hide" 25 | const val hidden = "hidden" 26 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Parallax.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface ParallaxComponent : Component 6 | 7 | external interface ParallaxOptions { 8 | var easing: Number? 9 | var target: String? 10 | var start: Any? /* Number | String */ 11 | var end: Any? /* Number | String */ 12 | var media: Any? /* Number | String */ 13 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Scroll.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface ScrollComponent : Component { 6 | fun scrollTo(el: Any? /* UIKitElement | String */ = definedExternally) 7 | } 8 | 9 | external interface ScrollOptions { 10 | var offset: Number? 11 | } 12 | 13 | object ScrollEvents { 14 | const val beforeScroll = "beforescroll" 15 | const val scrolled = "scrolled" 16 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Scrollspy.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface ScrollspyComponent : Component 6 | 7 | external interface ScrollspyNavElement 8 | 9 | external interface ScrollspyOptions { 10 | var cls: String? 11 | var hidden: Boolean? 12 | var offsetTop: Number? 13 | var offsetLeft: Number? 14 | var repeat: Boolean? 15 | var delay: Number? 16 | } 17 | 18 | external interface ScrollspyNavOptions { 19 | var cls: String? 20 | var closest: String? 21 | var scroll: Boolean? 22 | var overflow: Boolean? 23 | var offset: Number? 24 | } 25 | 26 | object ScrollspyEvents { 27 | const val inView = "inview" 28 | const val outView = "outview" 29 | } 30 | 31 | object ScrollspyNavEvents { 32 | const val active = "active" 33 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Sticky.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface StickyComponent : Component 6 | 7 | external interface StickyOptions { 8 | var top: Any? /* Number | String */ 9 | var bottom: Any? /* Boolean | String */ 10 | var offset: String? 11 | var animation: String? 12 | var clsActive: String? 13 | var clsInactive: String? 14 | var showOnUp: Boolean? 15 | var media: Any? /* Number | String */ 16 | var targetOffset: Any? /* Boolean | Number */ 17 | } 18 | 19 | object StickyEvents { 20 | const val active = "active" 21 | const val inactive = "inactive" 22 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Svg.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import org.w3c.dom.Element 4 | import uikit.Component 5 | import kotlin.js.Promise 6 | 7 | external interface SvgComponent : Component { 8 | val svg: Promise 9 | } 10 | 11 | external interface SvgOptions { 12 | var src: String? 13 | var strokeAnimation: Boolean? 14 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Switcher.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface SwitcherComponent : Component { 6 | fun show(index: Any? /* String | Number | Node */ = definedExternally) 7 | } 8 | 9 | external interface SwitcherOptions { 10 | var connect: String? 11 | var toggle: String? 12 | var itemNav: String? 13 | var active: Number? 14 | var animation: String? 15 | var duration: Number? 16 | var swiping: Boolean? 17 | } 18 | 19 | object SwitcherEvents { 20 | const val beforeShow = "beforeshow" 21 | const val show = "show" 22 | const val shown = "shown" 23 | const val beforeHide = "beforehide" 24 | const val hide = "hide" 25 | const val hidden = "hidden" 26 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Tab.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface TabComponent : Component { 6 | fun show(index: Any? /* String | Number | Node */ = definedExternally) 7 | } 8 | 9 | external interface TabOptions { 10 | var connect: String? 11 | var toggle: String? 12 | var active: Number? 13 | var animation: String? 14 | var duration: Number? 15 | var swiping: Boolean? 16 | var media: Any? /* Number | String */ 17 | } 18 | 19 | object TabEvents { 20 | const val beforeShow = "beforeshow" 21 | const val show = "show" 22 | const val shown = "shown" 23 | const val beforeHide = "beforehide" 24 | const val hide = "hide" 25 | const val hidden = "hidden" 26 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Toggle.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface ToggleComponent : Component { 6 | fun toggle() 7 | } 8 | 9 | external interface ToggleOptions { 10 | var target: String? 11 | var mode: String? 12 | var cls: String? 13 | var media: Any? /* Number | String */ 14 | var animation: String? 15 | var duration: Number? 16 | var queued: Boolean? 17 | } 18 | 19 | object ToggleEvents { 20 | const val beforeShow = "beforeshow" 21 | const val show = "show" 22 | const val shown = "shown" 23 | const val beforeHide = "beforehide" 24 | const val hide = "hide" 25 | const val hidden = "hidden" 26 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Tooltip.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface TooltipComponent : Component { 6 | fun show() 7 | fun hide() 8 | } 9 | 10 | external interface TooltipOptions { 11 | var title: String? 12 | var pos: String? 13 | var offset: Number? 14 | var animation: String? 15 | var duration: Number? 16 | var delay: Number? 17 | var cls: String? 18 | var container: String? 19 | } 20 | 21 | object TooltipEvents { 22 | const val beforeShow = "beforeshow" 23 | const val show = "show" 24 | const val shown = "shown" 25 | const val beforeHide = "beforehide" 26 | const val hide = "hide" 27 | const val hidden = "hidden" 28 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/components/Video.kt: -------------------------------------------------------------------------------- 1 | package uikit.components 2 | 3 | import uikit.Component 4 | 5 | external interface VideoComponent : Component 6 | 7 | external interface VideoOptions { 8 | var autoplay: Any? /* Boolean | String */ 9 | var automute: Boolean? 10 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Ajax.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | import org.w3c.dom.Image 4 | import org.w3c.xhr.XMLHttpRequest 5 | import kotlin.js.Promise 6 | 7 | external interface AjaxUtil { 8 | fun ajax(url: String? = definedExternally, options: dynamic = definedExternally): Promise 9 | fun getImage(src: String, srcset: String? = definedExternally, sizes: String? = definedExternally): Promise 10 | } 11 | 12 | external interface Environment { 13 | var data: dynamic 14 | var method: String 15 | var headers: dynamic 16 | var xhr: XMLHttpRequest 17 | var beforeSend: dynamic 18 | var responseType: String 19 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Attr.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | import org.w3c.dom.Attr 4 | import uikit.UIKitElement 5 | 6 | external interface AttrUtil { 7 | fun attr( 8 | element: UIKitElement? = definedExternally, 9 | name: String? = definedExternally, 10 | value: dynamic = definedExternally 11 | ): UIKitElement? 12 | 13 | fun hasAttr(element: UIKitElement? = definedExternally, name: String? = definedExternally): Boolean 14 | fun removeAttr(element: UIKitElement? = definedExternally, name: String) 15 | fun data(element: UIKitElement? = definedExternally, attribute: Attr): UIKitElement? 16 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Class.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | import uikit.UIKitElement 4 | 5 | external interface ClassUtil { 6 | fun addClass(element: UIKitElement? = definedExternally, vararg args: dynamic = definedExternally) 7 | fun removeClass(element: UIKitElement? = definedExternally, vararg args: dynamic = definedExternally) 8 | fun removeClasses(element: UIKitElement? = definedExternally, cls: String) 9 | fun replaceClass(element: UIKitElement? = definedExternally, vararg args: dynamic) 10 | fun hasClass(element: UIKitElement? = definedExternally, cls: String? = definedExternally): Boolean 11 | fun toggleClass( 12 | element: UIKitElement? = definedExternally, 13 | cls: String? = definedExternally, 14 | force: Boolean? = definedExternally 15 | ) 16 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Env.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | external interface EnvUtil { 4 | val inBrowser: Boolean 5 | val isIE: Boolean 6 | val isRtl: Boolean 7 | 8 | val hasTouch: Boolean 9 | 10 | val pointerDown: String 11 | val pointerMove: String 12 | val pointerUp: String 13 | val pointerEnter: String 14 | val pointerLeave: String 15 | val pointerCancel: String 16 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/FastDom.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | external interface FastDomUtil { 4 | val fastdom: dynamic 5 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Mouse.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | external interface MouseUtil { 4 | val mouseTracker: dynamic 5 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Options.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | external interface OptionsUtil { 4 | fun mergeOptions( 5 | parent: dynamic = definedExternally, 6 | child: dynamic = definedExternally, 7 | vm: dynamic = definedExternally 8 | ): dynamic 9 | 10 | fun parseOptions(options: dynamic = definedExternally, args: Array = definedExternally): dynamic 11 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Player.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | import uikit.UIKitElement 4 | 5 | external interface PlayerUtil { 6 | fun play(el: UIKitElement? = definedExternally) 7 | fun pause(el: UIKitElement? = definedExternally) 8 | fun mute(el: UIKitElement? = definedExternally) 9 | fun isVideo(el: UIKitElement? = definedExternally): Boolean 10 | fun isHTML5(el: UIKitElement? = definedExternally): Boolean 11 | fun isIFrame(el: UIKitElement? = definedExternally): Boolean 12 | fun isYoutube(el: UIKitElement? = definedExternally): Boolean 13 | fun isVimeo(el: UIKitElement? = definedExternally): Boolean 14 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Position.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | import uikit.UIKitElement 4 | 5 | external interface PositionUtil { 6 | fun positionAt( 7 | element: UIKitElement? = definedExternally, 8 | target: dynamic = definedExternally, 9 | elAttach: dynamic = definedExternally, 10 | targetAttach: dynamic = definedExternally, 11 | elOffset: dynamic = definedExternally, 12 | targetOffset: dynamic = definedExternally, 13 | flip: Boolean? = definedExternally, 14 | boundary: dynamic = definedExternally 15 | ): dynamic 16 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Promise.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | external interface PromiseUtil { 4 | val Promise: Any /* Boolean | Promise */ 5 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Selector.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | external interface SelectorUtil { 4 | fun query(selector: String? = definedExternally, context: dynamic = definedExternally): dynamic 5 | fun queryAll(selector: String? = definedExternally, context: dynamic = definedExternally): dynamic 6 | fun find(selector: String? = definedExternally, context: dynamic = definedExternally): dynamic 7 | fun findAll(selector: String? = definedExternally, context: dynamic = definedExternally): dynamic 8 | fun escape(css: dynamic = definedExternally): dynamic 9 | } -------------------------------------------------------------------------------- /kotlin-uikit/src/main/kotlin/uikit/util/Style.kt: -------------------------------------------------------------------------------- 1 | package uikit.util 2 | 3 | import uikit.UIKitElement 4 | 5 | external interface StyleUtil { 6 | fun css( 7 | element: UIKitElement? = definedExternally, 8 | property: dynamic = definedExternally, 9 | value: dynamic = definedExternally, 10 | priority: String? = definedExternally 11 | ): dynamic 12 | 13 | fun getCssVar(name: String? = definedExternally): dynamic 14 | } -------------------------------------------------------------------------------- /kotlin-uikit/uikit-samples/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("js") 3 | } 4 | 5 | dependencies { 6 | implementation(project(":kotlin-uikit")) 7 | 8 | implementation(kotlinWrapperDependency("react")) 9 | implementation(kotlinWrapperDependency("react-dom")) 10 | implementation(kotlinWrapperDependency("emotion")) 11 | } 12 | 13 | configureKotlinJs() -------------------------------------------------------------------------------- /kotlin-uikit/uikit-samples/src/main/kotlin/samples/Main.kt: -------------------------------------------------------------------------------- 1 | package samples 2 | 3 | import dom.Element 4 | import kotlinx.browser.document 5 | import react.create 6 | import react.dom.client.createRoot 7 | import uikit.* 8 | 9 | fun main() { 10 | js("require('uikit/dist/css/uikit.css')") 11 | 12 | UIkit.use(Icons) 13 | 14 | createRoot(document.getElementById("root").unsafeCast()).render(App.create()) 15 | } -------------------------------------------------------------------------------- /kotlin-uikit/uikit-samples/src/main/resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oxiadenine/kotlin-js-wrappers/e0017a108b36025630c354c7663256347e867251/kotlin-uikit/uikit-samples/src/main/resources/favicon.ico -------------------------------------------------------------------------------- /kotlin-uikit/uikit-samples/src/main/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Kotlin UIkit 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /kotlin-uikit/uikit-samples/src/main/resources/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Kotlin UIkit", 3 | "name": "Kotlin UIkit Samples", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "kotlin-js-wrappers" 2 | 3 | // include(":kotlin-antd", ":kotlin-antd:antd-samples") (Discontinued) 4 | // include(":kotlin-moment", ":kotlin-moment:moment-samples") (Discontinued) 5 | 6 | include("kotlin-react-intl", "kotlin-react-intl:react-intl-samples") 7 | include("kotlin-react-responsive", "kotlin-react-responsive:react-responsive-samples") 8 | include("kotlin-uikit", "kotlin-uikit:uikit-samples") --------------------------------------------------------------------------------