@cyberskill/design 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +267 -0
- package/README.md +316 -0
- package/SKILL.md +64 -0
- package/VERSION +1 -0
- package/_ds_bundle.js +5377 -0
- package/_ds_manifest.json +1 -0
- package/_esm/cs.mjs +137 -0
- package/assets/aurora-gold.jpg +0 -0
- package/assets/aurora-hoa.png +0 -0
- package/assets/aurora-kim.png +0 -0
- package/assets/aurora-moc.png +0 -0
- package/assets/aurora-thuy.png +0 -0
- package/assets/favicon.svg +1 -0
- package/assets/logo-mark.png +0 -0
- package/assets/logo-mark.svg +10 -0
- package/assets/lumi-poster.webp +0 -0
- package/assets/og-dashboard.png +0 -0
- package/base/a11y.css +57 -0
- package/base/ai.css +67 -0
- package/base/collections.css +53 -0
- package/base/components.css +212 -0
- package/base/controls.css +329 -0
- package/base/data.css +48 -0
- package/base/feedback.css +60 -0
- package/base/forms.css +32 -0
- package/base/glass.css +119 -0
- package/base/interaction.css +50 -0
- package/base/navigation.css +39 -0
- package/base/reset.css +17 -0
- package/base/responsive.css +128 -0
- package/base/shell.css +55 -0
- package/base/typography.css +14 -0
- package/components/_i18n/i18n.js +56 -0
- package/components/_i18n/strings.js +187 -0
- package/components/_utils/cx.js +4 -0
- package/components/ai/AIDisclosureBadge.d.ts +16 -0
- package/components/ai/AIDisclosureBadge.figma.tsx +12 -0
- package/components/ai/AIDisclosureBadge.jsx +39 -0
- package/components/ai/AIDisclosureBadge.prompt.md +9 -0
- package/components/ai/ChatMessage.d.ts +17 -0
- package/components/ai/ChatMessage.figma.tsx +12 -0
- package/components/ai/ChatMessage.jsx +22 -0
- package/components/ai/ChatMessage.prompt.md +8 -0
- package/components/ai/CitationList.d.ts +13 -0
- package/components/ai/CitationList.figma.tsx +12 -0
- package/components/ai/CitationList.jsx +22 -0
- package/components/ai/CitationList.prompt.md +5 -0
- package/components/ai/ConfidenceMeter.d.ts +17 -0
- package/components/ai/ConfidenceMeter.figma.tsx +12 -0
- package/components/ai/ConfidenceMeter.jsx +43 -0
- package/components/ai/ConfidenceMeter.prompt.md +6 -0
- package/components/ai/HumanReviewGate.d.ts +20 -0
- package/components/ai/HumanReviewGate.figma.tsx +12 -0
- package/components/ai/HumanReviewGate.jsx +37 -0
- package/components/ai/HumanReviewGate.prompt.md +13 -0
- package/components/ai/PromptInput.d.ts +21 -0
- package/components/ai/PromptInput.figma.tsx +12 -0
- package/components/ai/PromptInput.jsx +48 -0
- package/components/ai/PromptInput.prompt.md +5 -0
- package/components/ai/PromptSuggestions.d.ts +12 -0
- package/components/ai/PromptSuggestions.figma.tsx +12 -0
- package/components/ai/PromptSuggestions.jsx +20 -0
- package/components/ai/PromptSuggestions.prompt.md +5 -0
- package/components/ai/TypingIndicator.d.ts +9 -0
- package/components/ai/TypingIndicator.figma.tsx +12 -0
- package/components/ai/TypingIndicator.jsx +14 -0
- package/components/ai/TypingIndicator.prompt.md +5 -0
- package/components/ai/ai-conversation.card.html +49 -0
- package/components/ai/ai-lumi.card.html +39 -0
- package/components/ai/ai.card.html +43 -0
- package/components/brand/LumiAvatar.d.ts +14 -0
- package/components/brand/LumiAvatar.figma.tsx +12 -0
- package/components/brand/LumiAvatar.jsx +11 -0
- package/components/brand/LumiAvatar.prompt.md +5 -0
- package/components/brand/brand.card.html +37 -0
- package/components/button/Button.d.ts +24 -0
- package/components/button/Button.figma.tsx +31 -0
- package/components/button/Button.jsx +42 -0
- package/components/button/Button.prompt.md +12 -0
- package/components/button/ButtonGroup.d.ts +11 -0
- package/components/button/ButtonGroup.figma.tsx +12 -0
- package/components/button/ButtonGroup.jsx +7 -0
- package/components/button/ButtonGroup.prompt.md +8 -0
- package/components/button/FloatingActionButton.d.ts +15 -0
- package/components/button/FloatingActionButton.figma.tsx +12 -0
- package/components/button/FloatingActionButton.jsx +20 -0
- package/components/button/FloatingActionButton.prompt.md +6 -0
- package/components/button/buttons.card.html +52 -0
- package/components/data/Accordion.d.ts +14 -0
- package/components/data/Accordion.figma.tsx +12 -0
- package/components/data/Accordion.jsx +25 -0
- package/components/data/Accordion.prompt.md +5 -0
- package/components/data/Avatar.d.ts +18 -0
- package/components/data/Avatar.figma.tsx +12 -0
- package/components/data/Avatar.jsx +17 -0
- package/components/data/Avatar.prompt.md +6 -0
- package/components/data/Card.d.ts +23 -0
- package/components/data/Card.figma.tsx +12 -0
- package/components/data/Card.jsx +27 -0
- package/components/data/Card.prompt.md +9 -0
- package/components/data/Carousel.d.ts +13 -0
- package/components/data/Carousel.figma.tsx +12 -0
- package/components/data/Carousel.jsx +26 -0
- package/components/data/Carousel.prompt.md +5 -0
- package/components/data/Chart.d.ts +17 -0
- package/components/data/Chart.figma.tsx +12 -0
- package/components/data/Chart.jsx +52 -0
- package/components/data/Chart.prompt.md +5 -0
- package/components/data/CodeBlock.d.ts +12 -0
- package/components/data/CodeBlock.figma.tsx +12 -0
- package/components/data/CodeBlock.jsx +21 -0
- package/components/data/CodeBlock.prompt.md +5 -0
- package/components/data/Comment.d.ts +18 -0
- package/components/data/Comment.figma.tsx +12 -0
- package/components/data/Comment.jsx +24 -0
- package/components/data/Comment.prompt.md +7 -0
- package/components/data/DescriptionList.d.ts +10 -0
- package/components/data/DescriptionList.figma.tsx +12 -0
- package/components/data/DescriptionList.jsx +16 -0
- package/components/data/DescriptionList.prompt.md +5 -0
- package/components/data/Divider.d.ts +13 -0
- package/components/data/Divider.figma.tsx +12 -0
- package/components/data/Divider.jsx +11 -0
- package/components/data/Divider.prompt.md +6 -0
- package/components/data/Image.d.ts +18 -0
- package/components/data/Image.figma.tsx +12 -0
- package/components/data/Image.jsx +37 -0
- package/components/data/Image.prompt.md +5 -0
- package/components/data/Kbd.d.ts +8 -0
- package/components/data/Kbd.figma.tsx +12 -0
- package/components/data/Kbd.jsx +7 -0
- package/components/data/Kbd.prompt.md +5 -0
- package/components/data/List.d.ts +16 -0
- package/components/data/List.figma.tsx +12 -0
- package/components/data/List.jsx +24 -0
- package/components/data/List.prompt.md +7 -0
- package/components/data/Masonry.d.ts +13 -0
- package/components/data/Masonry.figma.tsx +12 -0
- package/components/data/Masonry.jsx +11 -0
- package/components/data/Masonry.prompt.md +5 -0
- package/components/data/QRCode.d.ts +12 -0
- package/components/data/QRCode.figma.tsx +12 -0
- package/components/data/QRCode.jsx +17 -0
- package/components/data/QRCode.prompt.md +5 -0
- package/components/data/Sortable.d.ts +10 -0
- package/components/data/Sortable.figma.tsx +12 -0
- package/components/data/Sortable.jsx +30 -0
- package/components/data/Sortable.prompt.md +5 -0
- package/components/data/Splitter.d.ts +16 -0
- package/components/data/Splitter.figma.tsx +12 -0
- package/components/data/Splitter.jsx +31 -0
- package/components/data/Splitter.prompt.md +5 -0
- package/components/data/Stat.d.ts +15 -0
- package/components/data/Stat.figma.tsx +12 -0
- package/components/data/Stat.jsx +19 -0
- package/components/data/Stat.prompt.md +5 -0
- package/components/data/Terminal.d.ts +13 -0
- package/components/data/Terminal.figma.tsx +12 -0
- package/components/data/Terminal.jsx +32 -0
- package/components/data/Terminal.prompt.md +5 -0
- package/components/data/Timeline.d.ts +17 -0
- package/components/data/Timeline.figma.tsx +12 -0
- package/components/data/Timeline.jsx +20 -0
- package/components/data/Timeline.prompt.md +8 -0
- package/components/data/Tooltip.d.ts +14 -0
- package/components/data/Tooltip.figma.tsx +12 -0
- package/components/data/Tooltip.jsx +12 -0
- package/components/data/Tooltip.prompt.md +5 -0
- package/components/data/Tree.d.ts +13 -0
- package/components/data/Tree.figma.tsx +12 -0
- package/components/data/Tree.jsx +23 -0
- package/components/data/Tree.prompt.md +5 -0
- package/components/data/Watermark.d.ts +15 -0
- package/components/data/Watermark.figma.tsx +12 -0
- package/components/data/Watermark.jsx +15 -0
- package/components/data/Watermark.prompt.md +5 -0
- package/components/data/collections.card.html +52 -0
- package/components/data/data.card.html +50 -0
- package/components/data/qr-encode.js +80 -0
- package/components/datatable/DataGrid.d.ts +42 -0
- package/components/datatable/DataGrid.figma.tsx +12 -0
- package/components/datatable/DataGrid.jsx +149 -0
- package/components/datatable/DataGrid.prompt.md +12 -0
- package/components/datatable/DataTable.d.ts +25 -0
- package/components/datatable/DataTable.figma.tsx +12 -0
- package/components/datatable/DataTable.jsx +42 -0
- package/components/datatable/DataTable.prompt.md +15 -0
- package/components/datatable/TreeTable.d.ts +14 -0
- package/components/datatable/TreeTable.figma.tsx +12 -0
- package/components/datatable/TreeTable.jsx +47 -0
- package/components/datatable/TreeTable.prompt.md +6 -0
- package/components/datatable/datatable.card.html +51 -0
- package/components/dialog/Dialog.d.ts +22 -0
- package/components/dialog/Dialog.figma.tsx +12 -0
- package/components/dialog/Dialog.jsx +99 -0
- package/components/dialog/Dialog.prompt.md +17 -0
- package/components/dialog/dialog.card.html +46 -0
- package/components/feedback/Alert.d.ts +16 -0
- package/components/feedback/Alert.figma.tsx +17 -0
- package/components/feedback/Alert.jsx +29 -0
- package/components/feedback/Alert.prompt.md +6 -0
- package/components/feedback/Badge.d.ts +15 -0
- package/components/feedback/Badge.figma.tsx +12 -0
- package/components/feedback/Badge.jsx +12 -0
- package/components/feedback/Badge.prompt.md +6 -0
- package/components/feedback/EmptyState.d.ts +13 -0
- package/components/feedback/EmptyState.figma.tsx +12 -0
- package/components/feedback/EmptyState.jsx +16 -0
- package/components/feedback/EmptyState.prompt.md +7 -0
- package/components/feedback/ProgressBar.d.ts +15 -0
- package/components/feedback/ProgressBar.figma.tsx +12 -0
- package/components/feedback/ProgressBar.jsx +13 -0
- package/components/feedback/ProgressBar.prompt.md +5 -0
- package/components/feedback/Result.d.ts +15 -0
- package/components/feedback/Result.figma.tsx +12 -0
- package/components/feedback/Result.jsx +24 -0
- package/components/feedback/Result.prompt.md +7 -0
- package/components/feedback/Skeleton.d.ts +18 -0
- package/components/feedback/Skeleton.figma.tsx +12 -0
- package/components/feedback/Skeleton.jsx +22 -0
- package/components/feedback/Skeleton.prompt.md +6 -0
- package/components/feedback/Spinner.d.ts +11 -0
- package/components/feedback/Spinner.figma.tsx +12 -0
- package/components/feedback/Spinner.jsx +10 -0
- package/components/feedback/Spinner.prompt.md +5 -0
- package/components/feedback/StatusIndicator.d.ts +11 -0
- package/components/feedback/StatusIndicator.figma.tsx +12 -0
- package/components/feedback/StatusIndicator.jsx +12 -0
- package/components/feedback/StatusIndicator.prompt.md +5 -0
- package/components/feedback/Tag.d.ts +14 -0
- package/components/feedback/Tag.figma.tsx +12 -0
- package/components/feedback/Tag.jsx +19 -0
- package/components/feedback/Tag.prompt.md +6 -0
- package/components/feedback/Toast.d.ts +19 -0
- package/components/feedback/Toast.figma.tsx +12 -0
- package/components/feedback/Toast.jsx +30 -0
- package/components/feedback/Toast.prompt.md +7 -0
- package/components/feedback/feedback-2.card.html +43 -0
- package/components/feedback/feedback.card.html +50 -0
- package/components/forms/Calendar.d.ts +10 -0
- package/components/forms/Calendar.figma.tsx +12 -0
- package/components/forms/Calendar.jsx +43 -0
- package/components/forms/Calendar.prompt.md +5 -0
- package/components/forms/Cascader.d.ts +17 -0
- package/components/forms/Cascader.figma.tsx +12 -0
- package/components/forms/Cascader.jsx +58 -0
- package/components/forms/Cascader.prompt.md +5 -0
- package/components/forms/Checkbox.d.ts +13 -0
- package/components/forms/Checkbox.figma.tsx +12 -0
- package/components/forms/Checkbox.jsx +16 -0
- package/components/forms/Checkbox.prompt.md +6 -0
- package/components/forms/ColorPicker.d.ts +12 -0
- package/components/forms/ColorPicker.figma.tsx +12 -0
- package/components/forms/ColorPicker.jsx +44 -0
- package/components/forms/ColorPicker.prompt.md +5 -0
- package/components/forms/Combobox.d.ts +17 -0
- package/components/forms/Combobox.figma.tsx +12 -0
- package/components/forms/Combobox.jsx +49 -0
- package/components/forms/Combobox.prompt.md +6 -0
- package/components/forms/DatePicker.d.ts +15 -0
- package/components/forms/DatePicker.figma.tsx +12 -0
- package/components/forms/DatePicker.jsx +35 -0
- package/components/forms/DatePicker.prompt.md +5 -0
- package/components/forms/Editor.d.ts +12 -0
- package/components/forms/Editor.figma.tsx +12 -0
- package/components/forms/Editor.jsx +26 -0
- package/components/forms/Editor.prompt.md +5 -0
- package/components/forms/FileUpload.d.ts +14 -0
- package/components/forms/FileUpload.figma.tsx +12 -0
- package/components/forms/FileUpload.jsx +29 -0
- package/components/forms/FileUpload.prompt.md +5 -0
- package/components/forms/Form.d.ts +87 -0
- package/components/forms/Form.figma.tsx +12 -0
- package/components/forms/Form.jsx +316 -0
- package/components/forms/Form.prompt.md +46 -0
- package/components/forms/InlineEdit.d.ts +13 -0
- package/components/forms/InlineEdit.figma.tsx +12 -0
- package/components/forms/InlineEdit.jsx +27 -0
- package/components/forms/InlineEdit.prompt.md +5 -0
- package/components/forms/InputGroup.d.ts +20 -0
- package/components/forms/InputGroup.figma.tsx +12 -0
- package/components/forms/InputGroup.jsx +25 -0
- package/components/forms/InputGroup.prompt.md +6 -0
- package/components/forms/InputOTP.d.ts +16 -0
- package/components/forms/InputOTP.figma.tsx +12 -0
- package/components/forms/InputOTP.jsx +47 -0
- package/components/forms/InputOTP.prompt.md +5 -0
- package/components/forms/Mentions.d.ts +13 -0
- package/components/forms/Mentions.figma.tsx +12 -0
- package/components/forms/Mentions.jsx +31 -0
- package/components/forms/Mentions.prompt.md +5 -0
- package/components/forms/NumberField.d.ts +14 -0
- package/components/forms/NumberField.figma.tsx +12 -0
- package/components/forms/NumberField.jsx +21 -0
- package/components/forms/NumberField.prompt.md +5 -0
- package/components/forms/RadioGroup.d.ts +24 -0
- package/components/forms/RadioGroup.figma.tsx +12 -0
- package/components/forms/RadioGroup.jsx +32 -0
- package/components/forms/RadioGroup.prompt.md +6 -0
- package/components/forms/Rating.d.ts +16 -0
- package/components/forms/Rating.figma.tsx +12 -0
- package/components/forms/Rating.jsx +22 -0
- package/components/forms/Rating.prompt.md +6 -0
- package/components/forms/SearchField.d.ts +11 -0
- package/components/forms/SearchField.figma.tsx +12 -0
- package/components/forms/SearchField.jsx +25 -0
- package/components/forms/SearchField.prompt.md +5 -0
- package/components/forms/SegmentedControl.d.ts +13 -0
- package/components/forms/SegmentedControl.figma.tsx +12 -0
- package/components/forms/SegmentedControl.jsx +31 -0
- package/components/forms/SegmentedControl.prompt.md +6 -0
- package/components/forms/Select.d.ts +19 -0
- package/components/forms/Select.figma.tsx +12 -0
- package/components/forms/Select.jsx +27 -0
- package/components/forms/Select.prompt.md +6 -0
- package/components/forms/Slider.d.ts +6 -0
- package/components/forms/Slider.figma.tsx +12 -0
- package/components/forms/Slider.jsx +8 -0
- package/components/forms/Slider.prompt.md +5 -0
- package/components/forms/Switch.d.ts +12 -0
- package/components/forms/Switch.figma.tsx +12 -0
- package/components/forms/Switch.jsx +14 -0
- package/components/forms/Switch.prompt.md +5 -0
- package/components/forms/TagInput.d.ts +16 -0
- package/components/forms/TagInput.figma.tsx +12 -0
- package/components/forms/TagInput.jsx +39 -0
- package/components/forms/TagInput.prompt.md +5 -0
- package/components/forms/Textarea.d.ts +14 -0
- package/components/forms/Textarea.figma.tsx +12 -0
- package/components/forms/Textarea.jsx +19 -0
- package/components/forms/Textarea.prompt.md +5 -0
- package/components/forms/TimePicker.d.ts +16 -0
- package/components/forms/TimePicker.figma.tsx +12 -0
- package/components/forms/TimePicker.jsx +22 -0
- package/components/forms/TimePicker.prompt.md +5 -0
- package/components/forms/Toggle.d.ts +16 -0
- package/components/forms/Toggle.figma.tsx +12 -0
- package/components/forms/Toggle.jsx +15 -0
- package/components/forms/Toggle.prompt.md +6 -0
- package/components/forms/Transfer.d.ts +14 -0
- package/components/forms/Transfer.figma.tsx +12 -0
- package/components/forms/Transfer.jsx +41 -0
- package/components/forms/Transfer.prompt.md +5 -0
- package/components/forms/TreeSelect.d.ts +15 -0
- package/components/forms/TreeSelect.figma.tsx +12 -0
- package/components/forms/TreeSelect.jsx +35 -0
- package/components/forms/TreeSelect.prompt.md +5 -0
- package/components/forms/forms-2.card.html +40 -0
- package/components/forms/forms.card.html +40 -0
- package/components/icon/Icon.d.ts +26 -0
- package/components/icon/Icon.figma.tsx +12 -0
- package/components/icon/Icon.jsx +74 -0
- package/components/icon/Icon.prompt.md +8 -0
- package/components/icon/icon.card.html +38 -0
- package/components/logo/Logo.d.ts +18 -0
- package/components/logo/Logo.figma.tsx +12 -0
- package/components/logo/Logo.jsx +25 -0
- package/components/logo/Logo.prompt.md +10 -0
- package/components/logo/logo-data.js +214 -0
- package/components/logo/logo.card.html +44 -0
- package/components/navigation/Anchor.d.ts +11 -0
- package/components/navigation/Anchor.figma.tsx +12 -0
- package/components/navigation/Anchor.jsx +25 -0
- package/components/navigation/Anchor.prompt.md +5 -0
- package/components/navigation/BackTop.d.ts +9 -0
- package/components/navigation/BackTop.figma.tsx +12 -0
- package/components/navigation/BackTop.jsx +23 -0
- package/components/navigation/BackTop.prompt.md +5 -0
- package/components/navigation/Breadcrumb.d.ts +14 -0
- package/components/navigation/Breadcrumb.figma.tsx +12 -0
- package/components/navigation/Breadcrumb.jsx +24 -0
- package/components/navigation/Breadcrumb.prompt.md +5 -0
- package/components/navigation/CommandPalette.d.ts +19 -0
- package/components/navigation/CommandPalette.figma.tsx +12 -0
- package/components/navigation/CommandPalette.jsx +48 -0
- package/components/navigation/CommandPalette.prompt.md +7 -0
- package/components/navigation/Dock.d.ts +6 -0
- package/components/navigation/Dock.figma.tsx +12 -0
- package/components/navigation/Dock.jsx +22 -0
- package/components/navigation/Dock.prompt.md +5 -0
- package/components/navigation/HotKeys.d.ts +13 -0
- package/components/navigation/HotKeys.figma.tsx +12 -0
- package/components/navigation/HotKeys.jsx +44 -0
- package/components/navigation/HotKeys.prompt.md +5 -0
- package/components/navigation/Link.d.ts +12 -0
- package/components/navigation/Link.figma.tsx +12 -0
- package/components/navigation/Link.jsx +13 -0
- package/components/navigation/Link.prompt.md +5 -0
- package/components/navigation/Menu.d.ts +23 -0
- package/components/navigation/Menu.figma.tsx +12 -0
- package/components/navigation/Menu.jsx +36 -0
- package/components/navigation/Menu.prompt.md +9 -0
- package/components/navigation/Menubar.d.ts +7 -0
- package/components/navigation/Menubar.figma.tsx +12 -0
- package/components/navigation/Menubar.jsx +48 -0
- package/components/navigation/Menubar.prompt.md +5 -0
- package/components/navigation/NavigationMenu.d.ts +7 -0
- package/components/navigation/NavigationMenu.figma.tsx +12 -0
- package/components/navigation/NavigationMenu.jsx +38 -0
- package/components/navigation/NavigationMenu.prompt.md +5 -0
- package/components/navigation/Pagination.d.ts +13 -0
- package/components/navigation/Pagination.figma.tsx +12 -0
- package/components/navigation/Pagination.jsx +32 -0
- package/components/navigation/Pagination.prompt.md +5 -0
- package/components/navigation/Sidebar.d.ts +20 -0
- package/components/navigation/Sidebar.figma.tsx +12 -0
- package/components/navigation/Sidebar.jsx +24 -0
- package/components/navigation/Sidebar.prompt.md +8 -0
- package/components/navigation/Steps.d.ts +13 -0
- package/components/navigation/Steps.figma.tsx +12 -0
- package/components/navigation/Steps.jsx +20 -0
- package/components/navigation/Steps.prompt.md +5 -0
- package/components/navigation/Tabs.d.ts +21 -0
- package/components/navigation/Tabs.figma.tsx +12 -0
- package/components/navigation/Tabs.jsx +41 -0
- package/components/navigation/Tabs.prompt.md +6 -0
- package/components/navigation/Toolbar.d.ts +16 -0
- package/components/navigation/Toolbar.figma.tsx +12 -0
- package/components/navigation/Toolbar.jsx +32 -0
- package/components/navigation/Toolbar.prompt.md +5 -0
- package/components/navigation/navigation.card.html +51 -0
- package/components/navigation/shell.card.html +52 -0
- package/components/overlays/ContextMenu.d.ts +10 -0
- package/components/overlays/ContextMenu.figma.tsx +12 -0
- package/components/overlays/ContextMenu.jsx +28 -0
- package/components/overlays/ContextMenu.prompt.md +7 -0
- package/components/overlays/Drawer.d.ts +18 -0
- package/components/overlays/Drawer.figma.tsx +12 -0
- package/components/overlays/Drawer.jsx +44 -0
- package/components/overlays/Drawer.prompt.md +8 -0
- package/components/overlays/HoverCard.d.ts +13 -0
- package/components/overlays/HoverCard.figma.tsx +12 -0
- package/components/overlays/HoverCard.jsx +17 -0
- package/components/overlays/HoverCard.prompt.md +5 -0
- package/components/overlays/Popconfirm.d.ts +18 -0
- package/components/overlays/Popconfirm.figma.tsx +12 -0
- package/components/overlays/Popconfirm.jsx +33 -0
- package/components/overlays/Popconfirm.prompt.md +6 -0
- package/components/overlays/Popover.d.ts +17 -0
- package/components/overlays/Popover.figma.tsx +12 -0
- package/components/overlays/Popover.jsx +24 -0
- package/components/overlays/Popover.prompt.md +7 -0
- package/components/overlays/Tour.d.ts +13 -0
- package/components/overlays/Tour.figma.tsx +12 -0
- package/components/overlays/Tour.jsx +46 -0
- package/components/overlays/Tour.prompt.md +5 -0
- package/components/overlays/overlays.card.html +50 -0
- package/components/textfield/TextField.d.ts +18 -0
- package/components/textfield/TextField.figma.tsx +14 -0
- package/components/textfield/TextField.jsx +44 -0
- package/components/textfield/TextField.prompt.md +11 -0
- package/components/textfield/textfield.card.html +34 -0
- package/docs/ci-cd.md +84 -0
- package/docs/consuming.md +109 -0
- package/docs/contrast-report.md +125 -0
- package/docs/conventions.md +114 -0
- package/docs/decisions.md +94 -0
- package/docs/deploy.md +110 -0
- package/docs/design-styles.md +25 -0
- package/docs/figma.md +119 -0
- package/docs/live-hub.md +58 -0
- package/docs/products.md +26 -0
- package/docs/quality-gates.md +94 -0
- package/docs/release-notes.md +31 -0
- package/docs/storybook.md +56 -0
- package/docs/sync.md +48 -0
- package/docs/template-schema-v2.md +36 -0
- package/docs/vi/ci-cd.md +84 -0
- package/docs/vi/consuming.md +109 -0
- package/docs/vi/contrast-report.md +125 -0
- package/docs/vi/conventions.md +114 -0
- package/docs/vi/decisions.md +94 -0
- package/docs/vi/deploy.md +110 -0
- package/docs/vi/design-styles.md +25 -0
- package/docs/vi/figma.md +119 -0
- package/docs/vi/live-hub.md +58 -0
- package/docs/vi/products.md +26 -0
- package/docs/vi/quality-gates.md +94 -0
- package/docs/vi/release-notes.md +31 -0
- package/docs/vi/storybook.md +56 -0
- package/docs/vi/sync.md +48 -0
- package/docs/vi/template-schema-v2.md +36 -0
- package/docs/viewer.html +230 -0
- package/fonts/bevietnampro-300-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-300-latin.woff2 +0 -0
- package/fonts/bevietnampro-300-vietnamese.woff2 +0 -0
- package/fonts/bevietnampro-400-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-400-latin.woff2 +0 -0
- package/fonts/bevietnampro-400-vietnamese.woff2 +0 -0
- package/fonts/bevietnampro-400i-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-400i-latin.woff2 +0 -0
- package/fonts/bevietnampro-400i-vietnamese.woff2 +0 -0
- package/fonts/bevietnampro-500-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-500-latin.woff2 +0 -0
- package/fonts/bevietnampro-500-vietnamese.woff2 +0 -0
- package/fonts/bevietnampro-600-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-600-latin.woff2 +0 -0
- package/fonts/bevietnampro-600-vietnamese.woff2 +0 -0
- package/fonts/bevietnampro-600i-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-600i-latin.woff2 +0 -0
- package/fonts/bevietnampro-600i-vietnamese.woff2 +0 -0
- package/fonts/bevietnampro-700-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-700-latin.woff2 +0 -0
- package/fonts/bevietnampro-700-vietnamese.woff2 +0 -0
- package/fonts/bevietnampro-800-latin-ext.woff2 +0 -0
- package/fonts/bevietnampro-800-latin.woff2 +0 -0
- package/fonts/bevietnampro-800-vietnamese.woff2 +0 -0
- package/fonts/jetbrainsmono-400-cyrillic-ext.woff2 +0 -0
- package/fonts/jetbrainsmono-400-cyrillic.woff2 +0 -0
- package/fonts/jetbrainsmono-400-greek.woff2 +0 -0
- package/fonts/jetbrainsmono-400-latin-ext.woff2 +0 -0
- package/fonts/jetbrainsmono-400-latin.woff2 +0 -0
- package/fonts/jetbrainsmono-400-vietnamese.woff2 +0 -0
- package/fonts/jetbrainsmono-500-cyrillic-ext.woff2 +0 -0
- package/fonts/jetbrainsmono-500-cyrillic.woff2 +0 -0
- package/fonts/jetbrainsmono-500-greek.woff2 +0 -0
- package/fonts/jetbrainsmono-500-latin-ext.woff2 +0 -0
- package/fonts/jetbrainsmono-500-latin.woff2 +0 -0
- package/fonts/jetbrainsmono-500-vietnamese.woff2 +0 -0
- package/fonts/jetbrainsmono-700-cyrillic-ext.woff2 +0 -0
- package/fonts/jetbrainsmono-700-cyrillic.woff2 +0 -0
- package/fonts/jetbrainsmono-700-greek.woff2 +0 -0
- package/fonts/jetbrainsmono-700-latin-ext.woff2 +0 -0
- package/fonts/jetbrainsmono-700-latin.woff2 +0 -0
- package/fonts/jetbrainsmono-700-vietnamese.woff2 +0 -0
- package/guidelines/atomic-view.html +497 -0
- package/guidelines/brand-iconography.html +51 -0
- package/guidelines/brand-imagery.html +23 -0
- package/guidelines/brand-interaction.html +24 -0
- package/guidelines/brand-voice.html +24 -0
- package/guidelines/colors-anchors.html +20 -0
- package/guidelines/colors-semantic.html +19 -0
- package/guidelines/colors-surfaces.html +19 -0
- package/guidelines/colors-text.html +20 -0
- package/guidelines/documents.html +43 -0
- package/guidelines/elements-components.html +27 -0
- package/guidelines/elements-concept.html +48 -0
- package/guidelines/elements-variants.html +49 -0
- package/guidelines/motion-interaction.html +29 -0
- package/guidelines/motion.html +53 -0
- package/guidelines/nav-model.cjs +113 -0
- package/guidelines/responsive-bilingual.html +75 -0
- package/guidelines/rtl-preview.html +115 -0
- package/guidelines/spacing-breakpoints.html +20 -0
- package/guidelines/spacing-radius.html +19 -0
- package/guidelines/spacing-scale.html +21 -0
- package/guidelines/surfaces-aurora.html +20 -0
- package/guidelines/surfaces-depth.html +27 -0
- package/guidelines/surfaces-glass.html +21 -0
- package/guidelines/surfaces-shadow.html +20 -0
- package/guidelines/type-families.html +25 -0
- package/guidelines/type-lineheight.html +16 -0
- package/guidelines/type-scale.html +21 -0
- package/guidelines/type-weights.html +20 -0
- package/llms.txt +70 -0
- package/package.json +88 -0
- package/styles.css +39 -0
- package/templates/_vendor/deck-stage.js +2584 -0
- package/templates/ai-cluster-demo.html +46 -0
- package/templates/app-shell/.thumbnail +0 -0
- package/templates/app-shell/AppShell.dc.html +80 -0
- package/templates/app-shell/content-schema.json +114 -0
- package/templates/app-shell/ds-base.js +23 -0
- package/templates/app-shell/support.js +1841 -0
- package/templates/article/.thumbnail +0 -0
- package/templates/article/Article.dc.html +67 -0
- package/templates/article/content-schema.json +80 -0
- package/templates/article/ds-base.js +23 -0
- package/templates/article/support.js +1841 -0
- package/templates/auth/.thumbnail +0 -0
- package/templates/auth/Auth.dc.html +72 -0
- package/templates/auth/content-schema.json +74 -0
- package/templates/auth/ds-base.js +23 -0
- package/templates/auth/support.js +1841 -0
- package/templates/bod-deck/.thumbnail +0 -0
- package/templates/bod-deck/BodDeck.dc.html +106 -0
- package/templates/bod-deck/content-schema.json +171 -0
- package/templates/bod-deck/ds-base.js +23 -0
- package/templates/bod-deck/support.js +1841 -0
- package/templates/bod-investor-update/.thumbnail +0 -0
- package/templates/bod-investor-update/BodInvestorUpdate.dc.html +81 -0
- package/templates/bod-investor-update/content-schema.json +105 -0
- package/templates/bod-investor-update/ds-base.js +23 -0
- package/templates/bod-investor-update/support.js +1841 -0
- package/templates/bod-memo/.thumbnail +0 -0
- package/templates/bod-memo/BodMemo.dc.html +87 -0
- package/templates/bod-memo/ds-base.js +23 -0
- package/templates/bod-memo/support.js +1841 -0
- package/templates/bod-minutes/.thumbnail +0 -0
- package/templates/bod-minutes/BodMinutes.dc.html +84 -0
- package/templates/bod-minutes/ds-base.js +23 -0
- package/templates/bod-minutes/support.js +1841 -0
- package/templates/bod-report/.thumbnail +0 -0
- package/templates/bod-report/BodReport.dc.html +106 -0
- package/templates/bod-report/content-schema.json +29 -0
- package/templates/bod-report/ds-base.js +23 -0
- package/templates/bod-report/support.js +1841 -0
- package/templates/bod-resolution/.thumbnail +0 -0
- package/templates/bod-resolution/BodResolution.dc.html +87 -0
- package/templates/bod-resolution/content-schema.json +123 -0
- package/templates/bod-resolution/ds-base.js +23 -0
- package/templates/bod-resolution/support.js +1841 -0
- package/templates/culture-event-invite/.thumbnail +0 -0
- package/templates/culture-event-invite/CultureEventInvite.dc.html +73 -0
- package/templates/culture-event-invite/ds-base.js +23 -0
- package/templates/culture-event-invite/support.js +1841 -0
- package/templates/dashboard/.thumbnail +0 -0
- package/templates/dashboard/Dashboard.dc.html +120 -0
- package/templates/dashboard/content-schema.json +97 -0
- package/templates/dashboard/ds-base.js +23 -0
- package/templates/dashboard/support.js +1841 -0
- package/templates/delivery-change-note/.thumbnail +0 -0
- package/templates/delivery-change-note/DeliveryChangeNote.dc.html +85 -0
- package/templates/delivery-change-note/content-schema.json +158 -0
- package/templates/delivery-change-note/ds-base.js +23 -0
- package/templates/delivery-change-note/support.js +1841 -0
- package/templates/delivery-kickoff/.thumbnail +0 -0
- package/templates/delivery-kickoff/DeliveryKickoff.dc.html +112 -0
- package/templates/delivery-kickoff/content-schema.json +223 -0
- package/templates/delivery-kickoff/ds-base.js +23 -0
- package/templates/delivery-kickoff/support.js +1841 -0
- package/templates/delivery-qbr-deck/.thumbnail +0 -0
- package/templates/delivery-qbr-deck/DeliveryQbrDeck.dc.html +118 -0
- package/templates/delivery-qbr-deck/content-schema.json +177 -0
- package/templates/delivery-qbr-deck/ds-base.js +23 -0
- package/templates/delivery-qbr-deck/support.js +1841 -0
- package/templates/delivery-runbook/.thumbnail +0 -0
- package/templates/delivery-runbook/DeliveryRunbook.dc.html +91 -0
- package/templates/delivery-runbook/content-schema.json +211 -0
- package/templates/delivery-runbook/ds-base.js +23 -0
- package/templates/delivery-runbook/support.js +1841 -0
- package/templates/delivery-status-email/.thumbnail +0 -0
- package/templates/delivery-status-email/DeliveryStatusEmail.dc.html +78 -0
- package/templates/delivery-status-email/ds-base.js +23 -0
- package/templates/delivery-status-email/support.js +1841 -0
- package/templates/doc-style-guide/.thumbnail +0 -0
- package/templates/doc-style-guide/DocStyleGuide.dc.html +148 -0
- package/templates/doc-style-guide/ds-base.js +23 -0
- package/templates/doc-style-guide/support.js +1841 -0
- package/templates/doc-suite-index/.thumbnail +0 -0
- package/templates/doc-suite-index/DocSuiteIndex.dc.html +201 -0
- package/templates/doc-suite-index/content-schema.json +12 -0
- package/templates/doc-suite-index/ds-base.js +23 -0
- package/templates/doc-suite-index/support.js +1841 -0
- package/templates/doc-templates/.thumbnail +0 -0
- package/templates/doc-templates/DocTemplates.dc.html +118 -0
- package/templates/doc-templates/ds-base.js +23 -0
- package/templates/doc-templates/support.js +1841 -0
- package/templates/email/.thumbnail +0 -0
- package/templates/email/Email-VN-standalone.html +59 -0
- package/templates/email/Email.dc.html +67 -0
- package/templates/email/ds-base.js +23 -0
- package/templates/email/support.js +1841 -0
- package/templates/email-safe/README.md +28 -0
- package/templates/email-safe/email-announcement.html +88 -0
- package/templates/email-safe/email-dunning.html +59 -0
- package/templates/email-safe/email-investor.html +88 -0
- package/templates/email-safe/email-launch.html +88 -0
- package/templates/email-safe/email-newsletter.html +62 -0
- package/templates/email-safe/email-status.html +88 -0
- package/templates/email-safe/email-transactional.html +88 -0
- package/templates/finance-dunning-email/.thumbnail +0 -0
- package/templates/finance-dunning-email/FinanceDunningEmail.dc.html +58 -0
- package/templates/finance-dunning-email/ds-base.js +23 -0
- package/templates/finance-dunning-email/support.js +1841 -0
- package/templates/finance-expense-report/.thumbnail +0 -0
- package/templates/finance-expense-report/FinanceExpenseReport.dc.html +82 -0
- package/templates/finance-expense-report/ds-base.js +23 -0
- package/templates/finance-expense-report/support.js +1841 -0
- package/templates/finance-invoice/.thumbnail +0 -0
- package/templates/finance-invoice/FinanceInvoice.dc.html +92 -0
- package/templates/finance-invoice/ds-base.js +23 -0
- package/templates/finance-invoice/support.js +1841 -0
- package/templates/finance-quote/.thumbnail +0 -0
- package/templates/finance-quote/FinanceQuote.dc.html +86 -0
- package/templates/finance-quote/ds-base.js +23 -0
- package/templates/finance-quote/support.js +1841 -0
- package/templates/hr-announcement/.thumbnail +0 -0
- package/templates/hr-announcement/HrAnnouncement.dc.html +64 -0
- package/templates/hr-announcement/ds-base.js +23 -0
- package/templates/hr-announcement/support.js +1841 -0
- package/templates/hr-interview-kit/.thumbnail +0 -0
- package/templates/hr-interview-kit/HrInterviewKit.dc.html +102 -0
- package/templates/hr-interview-kit/ds-base.js +23 -0
- package/templates/hr-interview-kit/support.js +1841 -0
- package/templates/hr-offboarding/.thumbnail +0 -0
- package/templates/hr-offboarding/HrOffboarding.dc.html +86 -0
- package/templates/hr-offboarding/ds-base.js +23 -0
- package/templates/hr-offboarding/support.js +1841 -0
- package/templates/hr-performance-review/.thumbnail +0 -0
- package/templates/hr-performance-review/HrPerformanceReview.dc.html +95 -0
- package/templates/hr-performance-review/ds-base.js +23 -0
- package/templates/hr-performance-review/support.js +1841 -0
- package/templates/hr-pip/.thumbnail +0 -0
- package/templates/hr-pip/HrPip.dc.html +73 -0
- package/templates/hr-pip/ds-base.js +23 -0
- package/templates/hr-pip/support.js +1841 -0
- package/templates/image-slots-demo.html +57 -0
- package/templates/kitchen-sink.html +127 -0
- package/templates/legal-msa/.thumbnail +0 -0
- package/templates/legal-msa/LegalMsa.dc.html +85 -0
- package/templates/legal-msa/ds-base.js +23 -0
- package/templates/legal-msa/support.js +1841 -0
- package/templates/legal-sow/.thumbnail +0 -0
- package/templates/legal-sow/LegalSow.dc.html +125 -0
- package/templates/legal-sow/ds-base.js +23 -0
- package/templates/legal-sow/support.js +1841 -0
- package/templates/marketing-campaign-brief/.thumbnail +0 -0
- package/templates/marketing-campaign-brief/MarketingCampaignBrief.dc.html +86 -0
- package/templates/marketing-campaign-brief/content-schema.json +139 -0
- package/templates/marketing-campaign-brief/ds-base.js +23 -0
- package/templates/marketing-campaign-brief/support.js +1841 -0
- package/templates/marketing-case-study/.thumbnail +0 -0
- package/templates/marketing-case-study/MarketingCaseStudy.dc.html +82 -0
- package/templates/marketing-case-study/content-schema.json +103 -0
- package/templates/marketing-case-study/ds-base.js +23 -0
- package/templates/marketing-case-study/support.js +1841 -0
- package/templates/marketing-launch/.thumbnail +0 -0
- package/templates/marketing-launch/MarketingLaunch.dc.html +84 -0
- package/templates/marketing-launch/ds-base.js +23 -0
- package/templates/marketing-launch/support.js +1841 -0
- package/templates/marketing-newsletter/.thumbnail +0 -0
- package/templates/marketing-newsletter/MarketingNewsletter.dc.html +109 -0
- package/templates/marketing-newsletter/ds-base.js +23 -0
- package/templates/marketing-newsletter/support.js +1841 -0
- package/templates/marketing-page/.thumbnail +0 -0
- package/templates/marketing-page/MarketingPage.dc.html +132 -0
- package/templates/marketing-page/content-schema.json +33 -0
- package/templates/marketing-page/ds-base.js +23 -0
- package/templates/marketing-page/support.js +1841 -0
- package/templates/marketing-press-release/.thumbnail +0 -0
- package/templates/marketing-press-release/MarketingPressRelease.dc.html +84 -0
- package/templates/marketing-press-release/content-schema.json +116 -0
- package/templates/marketing-press-release/ds-base.js +23 -0
- package/templates/marketing-press-release/support.js +1841 -0
- package/templates/marketing-social-kit/.thumbnail +0 -0
- package/templates/marketing-social-kit/MarketingSocialKit.dc.html +77 -0
- package/templates/marketing-social-kit/content-schema.json +54 -0
- package/templates/marketing-social-kit/ds-base.js +23 -0
- package/templates/marketing-social-kit/support.js +1841 -0
- package/templates/playground.html +79 -0
- package/templates/sales-one-pager/.thumbnail +0 -0
- package/templates/sales-one-pager/SalesOnePager.dc.html +103 -0
- package/templates/sales-one-pager/content-schema.json +73 -0
- package/templates/sales-one-pager/ds-base.js +23 -0
- package/templates/sales-one-pager/support.js +1841 -0
- package/templates/sales-proposal-deck/.thumbnail +0 -0
- package/templates/sales-proposal-deck/SalesProposalDeck.dc.html +159 -0
- package/templates/sales-proposal-deck/content-schema.json +273 -0
- package/templates/sales-proposal-deck/ds-base.js +23 -0
- package/templates/sales-proposal-deck/support.js +1841 -0
- package/templates/schema/content-schema.schema.json +31 -0
- package/templates/settings/.thumbnail +0 -0
- package/templates/settings/Settings.dc.html +86 -0
- package/templates/settings/content-schema.json +131 -0
- package/templates/settings/ds-base.js +23 -0
- package/templates/settings/support.js +1841 -0
- package/templates/slide-deck/.thumbnail +0 -0
- package/templates/slide-deck/SlideDeck.dc.html +86 -0
- package/templates/slide-deck/content-schema.json +23 -0
- package/templates/slide-deck/ds-base.js +23 -0
- package/templates/slide-deck/support.js +1841 -0
- package/templates/team-meeting-agenda/.thumbnail +0 -0
- package/templates/team-meeting-agenda/TeamMeetingAgenda.dc.html +93 -0
- package/templates/team-meeting-agenda/ds-base.js +23 -0
- package/templates/team-meeting-agenda/support.js +1841 -0
- package/templates/tech-incident-report/.thumbnail +0 -0
- package/templates/tech-incident-report/TechIncidentReport.dc.html +111 -0
- package/templates/tech-incident-report/content-schema.json +25 -0
- package/templates/tech-incident-report/ds-base.js +23 -0
- package/templates/tech-incident-report/support.js +1841 -0
- package/templates/tech-release-notes/.thumbnail +0 -0
- package/templates/tech-release-notes/TechReleaseNotes.dc.html +79 -0
- package/templates/tech-release-notes/ds-base.js +23 -0
- package/templates/tech-release-notes/support.js +1841 -0
- package/templates/tech-retro/.thumbnail +0 -0
- package/templates/tech-retro/TechRetro.dc.html +84 -0
- package/templates/tech-retro/ds-base.js +23 -0
- package/templates/tech-retro/support.js +1841 -0
- package/templates/tech-rfc/.thumbnail +0 -0
- package/templates/tech-rfc/TechRfc.dc.html +87 -0
- package/templates/tech-rfc/content-schema.json +115 -0
- package/templates/tech-rfc/ds-base.js +23 -0
- package/templates/tech-rfc/support.js +1841 -0
- package/templates/vn-appointment-transfer/.thumbnail +0 -0
- package/templates/vn-appointment-transfer/VnAppointmentTransfer.dc.html +101 -0
- package/templates/vn-appointment-transfer/ds-base.js +23 -0
- package/templates/vn-appointment-transfer/support.js +1841 -0
- package/templates/vn-certificate-of-employment/.thumbnail +0 -0
- package/templates/vn-certificate-of-employment/VnCertificateOfEmployment.dc.html +84 -0
- package/templates/vn-certificate-of-employment/ds-base.js +23 -0
- package/templates/vn-certificate-of-employment/support.js +1841 -0
- package/templates/vn-code-of-conduct/.thumbnail +0 -0
- package/templates/vn-code-of-conduct/VnCodeOfConduct.dc.html +105 -0
- package/templates/vn-code-of-conduct/ds-base.js +23 -0
- package/templates/vn-code-of-conduct/support.js +1841 -0
- package/templates/vn-compensation-regulation/.thumbnail +0 -0
- package/templates/vn-compensation-regulation/VnCompensationRegulation.dc.html +122 -0
- package/templates/vn-compensation-regulation/ds-base.js +23 -0
- package/templates/vn-compensation-regulation/support.js +1841 -0
- package/templates/vn-contract-amendment/.thumbnail +0 -0
- package/templates/vn-contract-amendment/VnContractAmendment.dc.html +107 -0
- package/templates/vn-contract-amendment/ds-base.js +23 -0
- package/templates/vn-contract-amendment/support.js +1841 -0
- package/templates/vn-contractor-agreement/.thumbnail +0 -0
- package/templates/vn-contractor-agreement/VnContractorAgreement.dc.html +120 -0
- package/templates/vn-contractor-agreement/ds-base.js +23 -0
- package/templates/vn-contractor-agreement/support.js +1841 -0
- package/templates/vn-data-protection-policy/.thumbnail +0 -0
- package/templates/vn-data-protection-policy/VnDataProtectionPolicy.dc.html +116 -0
- package/templates/vn-data-protection-policy/ds-base.js +23 -0
- package/templates/vn-data-protection-policy/support.js +1841 -0
- package/templates/vn-disciplinary-case-file/.thumbnail +0 -0
- package/templates/vn-disciplinary-case-file/VnDisciplinaryCaseFile.dc.html +172 -0
- package/templates/vn-disciplinary-case-file/ds-base.js +23 -0
- package/templates/vn-disciplinary-case-file/support.js +1841 -0
- package/templates/vn-disciplinary-schedule/.thumbnail +0 -0
- package/templates/vn-disciplinary-schedule/VnDisciplinarySchedule.dc.html +91 -0
- package/templates/vn-disciplinary-schedule/ds-base.js +23 -0
- package/templates/vn-disciplinary-schedule/support.js +1841 -0
- package/templates/vn-employee-request/.thumbnail +0 -0
- package/templates/vn-employee-request/VnEmployeeRequest.dc.html +137 -0
- package/templates/vn-employee-request/ds-base.js +23 -0
- package/templates/vn-employee-request/support.js +1841 -0
- package/templates/vn-exit-handover/.thumbnail +0 -0
- package/templates/vn-exit-handover/VnExitHandover.dc.html +228 -0
- package/templates/vn-exit-handover/ds-base.js +23 -0
- package/templates/vn-exit-handover/support.js +1841 -0
- package/templates/vn-foreign-employee-pack/.thumbnail +0 -0
- package/templates/vn-foreign-employee-pack/VnForeignEmployeePack.dc.html +129 -0
- package/templates/vn-foreign-employee-pack/content-schema.json +22 -0
- package/templates/vn-foreign-employee-pack/ds-base.js +23 -0
- package/templates/vn-foreign-employee-pack/support.js +1841 -0
- package/templates/vn-grassroots-democracy/.thumbnail +0 -0
- package/templates/vn-grassroots-democracy/VnGrassrootsDemocracy.dc.html +117 -0
- package/templates/vn-grassroots-democracy/ds-base.js +23 -0
- package/templates/vn-grassroots-democracy/support.js +1841 -0
- package/templates/vn-infosec-policy/.thumbnail +0 -0
- package/templates/vn-infosec-policy/VnInfosecPolicy.dc.html +116 -0
- package/templates/vn-infosec-policy/ds-base.js +23 -0
- package/templates/vn-infosec-policy/support.js +1841 -0
- package/templates/vn-internal-labor-regulations/.thumbnail +0 -0
- package/templates/vn-internal-labor-regulations/VnInternalLaborRegulations.dc.html +155 -0
- package/templates/vn-internal-labor-regulations/ds-base.js +23 -0
- package/templates/vn-internal-labor-regulations/support.js +1841 -0
- package/templates/vn-internship-agreement/.thumbnail +0 -0
- package/templates/vn-internship-agreement/VnInternshipAgreement.dc.html +112 -0
- package/templates/vn-internship-agreement/ds-base.js +23 -0
- package/templates/vn-internship-agreement/support.js +1841 -0
- package/templates/vn-job-description/.thumbnail +0 -0
- package/templates/vn-job-description/VnJobDescription.dc.html +85 -0
- package/templates/vn-job-description/ds-base.js +23 -0
- package/templates/vn-job-description/support.js +1841 -0
- package/templates/vn-labor-contract/.thumbnail +0 -0
- package/templates/vn-labor-contract/VnLaborContract.dc.html +180 -0
- package/templates/vn-labor-contract/ds-base.js +23 -0
- package/templates/vn-labor-contract/support.js +1841 -0
- package/templates/vn-labour-management-book/.thumbnail +0 -0
- package/templates/vn-labour-management-book/VnLabourManagementBook.dc.html +115 -0
- package/templates/vn-labour-management-book/ds-base.js +23 -0
- package/templates/vn-labour-management-book/support.js +1841 -0
- package/templates/vn-mutual-nda/.thumbnail +0 -0
- package/templates/vn-mutual-nda/VnMutualNda.dc.html +114 -0
- package/templates/vn-mutual-nda/ds-base.js +23 -0
- package/templates/vn-mutual-nda/support.js +1841 -0
- package/templates/vn-ndnca-ip/.thumbnail +0 -0
- package/templates/vn-ndnca-ip/VnNdncaIp.dc.html +157 -0
- package/templates/vn-ndnca-ip/ds-base.js +23 -0
- package/templates/vn-ndnca-ip/support.js +1841 -0
- package/templates/vn-offer-letter/.thumbnail +0 -0
- package/templates/vn-offer-letter/VnOfferLetter.dc.html +84 -0
- package/templates/vn-offer-letter/ds-base.js +23 -0
- package/templates/vn-offer-letter/support.js +1841 -0
- package/templates/vn-onboarding-checklist/.thumbnail +0 -0
- package/templates/vn-onboarding-checklist/VnOnboardingChecklist.dc.html +98 -0
- package/templates/vn-onboarding-checklist/content-schema.json +12 -0
- package/templates/vn-onboarding-checklist/ds-base.js +23 -0
- package/templates/vn-onboarding-checklist/support.js +1841 -0
- package/templates/vn-pdpl-consent/.thumbnail +0 -0
- package/templates/vn-pdpl-consent/VnPdplConsent.dc.html +111 -0
- package/templates/vn-pdpl-consent/ds-base.js +23 -0
- package/templates/vn-pdpl-consent/support.js +1841 -0
- package/templates/vn-performance-evaluation-regulation/.thumbnail +0 -0
- package/templates/vn-performance-evaluation-regulation/VnPerformanceEvaluationRegulation.dc.html +135 -0
- package/templates/vn-performance-evaluation-regulation/ds-base.js +23 -0
- package/templates/vn-performance-evaluation-regulation/support.js +1841 -0
- package/templates/vn-performance-review-form/.thumbnail +0 -0
- package/templates/vn-performance-review-form/VnPerformanceReviewForm.dc.html +129 -0
- package/templates/vn-performance-review-form/ds-base.js +23 -0
- package/templates/vn-performance-review-form/support.js +1841 -0
- package/templates/vn-phantom-stock/.thumbnail +0 -0
- package/templates/vn-phantom-stock/VnPhantomStock.dc.html +184 -0
- package/templates/vn-phantom-stock/content-schema.json +17 -0
- package/templates/vn-phantom-stock/ds-base.js +23 -0
- package/templates/vn-phantom-stock/support.js +1841 -0
- package/templates/vn-probation-contract/.thumbnail +0 -0
- package/templates/vn-probation-contract/VnProbationContract.dc.html +126 -0
- package/templates/vn-probation-contract/ds-base.js +23 -0
- package/templates/vn-probation-contract/support.js +1841 -0
- package/templates/vn-receipt-acknowledgement/.thumbnail +0 -0
- package/templates/vn-receipt-acknowledgement/VnReceiptAcknowledgement.dc.html +106 -0
- package/templates/vn-receipt-acknowledgement/ds-base.js +23 -0
- package/templates/vn-receipt-acknowledgement/support.js +1841 -0
- package/templates/vn-remote-work-policy/.thumbnail +0 -0
- package/templates/vn-remote-work-policy/VnRemoteWorkPolicy.dc.html +103 -0
- package/templates/vn-remote-work-policy/ds-base.js +23 -0
- package/templates/vn-remote-work-policy/support.js +1841 -0
- package/templates/vn-resignation-letter/.thumbnail +0 -0
- package/templates/vn-resignation-letter/VnResignationLetter.dc.html +71 -0
- package/templates/vn-resignation-letter/ds-base.js +23 -0
- package/templates/vn-resignation-letter/support.js +1841 -0
- package/templates/vn-salary-scale/.thumbnail +0 -0
- package/templates/vn-salary-scale/VnSalaryScale.dc.html +110 -0
- package/templates/vn-salary-scale/ds-base.js +23 -0
- package/templates/vn-salary-scale/support.js +1841 -0
- package/templates/vn-sow-appendix/.thumbnail +0 -0
- package/templates/vn-sow-appendix/VnSowAppendix.dc.html +70 -0
- package/templates/vn-sow-appendix/ds-base.js +23 -0
- package/templates/vn-sow-appendix/support.js +1841 -0
- package/templates/vn-termination-decision/.thumbnail +0 -0
- package/templates/vn-termination-decision/VnTerminationDecision.dc.html +80 -0
- package/templates/vn-termination-decision/ds-base.js +23 -0
- package/templates/vn-termination-decision/support.js +1841 -0
- package/templates/vn-total-rewards-appendix/.thumbnail +0 -0
- package/templates/vn-total-rewards-appendix/VnTotalRewardsAppendix.dc.html +138 -0
- package/templates/vn-total-rewards-appendix/ds-base.js +23 -0
- package/templates/vn-total-rewards-appendix/support.js +1841 -0
- package/templates/vn-training-commitment/.thumbnail +0 -0
- package/templates/vn-training-commitment/VnTrainingCommitment.dc.html +105 -0
- package/templates/vn-training-commitment/ds-base.js +23 -0
- package/templates/vn-training-commitment/support.js +1841 -0
- package/templates/vn-travel-expense-policy/.thumbnail +0 -0
- package/templates/vn-travel-expense-policy/VnTravelExpensePolicy.dc.html +113 -0
- package/templates/vn-travel-expense-policy/ds-base.js +23 -0
- package/templates/vn-travel-expense-policy/support.js +1841 -0
- package/tokens/colors.css +77 -0
- package/tokens/component-tokens.css +46 -0
- package/tokens/elements.css +300 -0
- package/tokens/elevation.css +46 -0
- package/tokens/fonts.css +51 -0
- package/tokens/motion.css +25 -0
- package/tokens/native/CSTokens.kt +255 -0
- package/tokens/native/CSTokens.swift +257 -0
- package/tokens/native/cs_tokens.dart +253 -0
- package/tokens/provenance.json +52 -0
- package/tokens/spacing.css +34 -0
- package/tokens/tokens.dtcg.json +1222 -0
- package/tokens/tokens.js +436 -0
- package/tokens/tokens.json +434 -0
- package/tokens/typography.css +67 -0
- package/tokens/viewer.html +261 -0
- package/ui_kits/deck/README.md +21 -0
- package/ui_kits/deck/index.html +120 -0
- package/ui_kits/status-hub/README.md +40 -0
- package/ui_kits/status-hub/StatusHub.jsx +270 -0
- package/ui_kits/status-hub/data.js +57 -0
- package/ui_kits/status-hub/identity-lab.html +134 -0
- package/ui_kits/status-hub/index.html +24 -0
- package/ui_kits/status-hub/login.html +65 -0
- package/ui_kits/status-hub/project.html +137 -0
- package/ui_kits/status-hub/settings.html +88 -0
- package/ui_kits/status-hub/status.css +199 -0
- package/ui_kits/website/README.md +36 -0
- package/ui_kits/website/Website.jsx +167 -0
- package/ui_kits/website/careers.html +109 -0
- package/ui_kits/website/chat.html +133 -0
- package/ui_kits/website/copy.js +76 -0
- package/ui_kits/website/index.html +24 -0
- package/ui_kits/website/site.css +121 -0
- package/ui_kits/website/work.html +119 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
/** Advanced table: sortable columns (aria-sort), checkbox row selection,
|
|
4
|
+
* sticky-header scroll area, bilingual empty/select labels,
|
|
5
|
+
* optional virtualization + column-order persistence. */
|
|
6
|
+
export interface DataGridColumn<R = any> {
|
|
7
|
+
key: string;
|
|
8
|
+
header: ReactNode;
|
|
9
|
+
sortable?: boolean;
|
|
10
|
+
/** Sticky first-column style pin (inline-start). */
|
|
11
|
+
pinned?: boolean;
|
|
12
|
+
/** Custom sort value; defaults to row[key]. */
|
|
13
|
+
sortValue?: (row: R) => string | number;
|
|
14
|
+
render?: (row: R) => ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface DataGridProps<R = any> {
|
|
17
|
+
columns: DataGridColumn<R>[];
|
|
18
|
+
rows: R[];
|
|
19
|
+
rowKey?: string;
|
|
20
|
+
selectable?: boolean;
|
|
21
|
+
selected?: Array<string | number>;
|
|
22
|
+
onSelect?: (keys: Array<string | number>) => void;
|
|
23
|
+
/** Scroll-area max height px. Default 280. */
|
|
24
|
+
height?: number;
|
|
25
|
+
caption?: ReactNode;
|
|
26
|
+
empty?: ReactNode;
|
|
27
|
+
/** Client-side filter query; matches any column value (or filterKeys). */
|
|
28
|
+
filterText?: string;
|
|
29
|
+
/** Column keys to filter when filterText is set. Defaults to all column keys. */
|
|
30
|
+
filterKeys?: string[];
|
|
31
|
+
/** Force row windowing. Also auto-enables when rows >= virtualThreshold. */
|
|
32
|
+
virtual?: boolean;
|
|
33
|
+
/** Auto-virtualize when row count reaches this (default 80). */
|
|
34
|
+
virtualThreshold?: number;
|
|
35
|
+
/** Estimated row height for window math (default 36). */
|
|
36
|
+
rowHeight?: number;
|
|
37
|
+
/** When set, column order is stored under localStorage key cs:datagrid:cols:<persistKey>. */
|
|
38
|
+
persistKey?: string;
|
|
39
|
+
lang?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
export function DataGrid(props: DataGridProps): React.ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import figma from '@figma/code-connect'
|
|
2
|
+
import { DataGrid } from './DataGrid.jsx'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Code Connect stub — DataGrid
|
|
6
|
+
* Prop maps stay minimal until the matching Figma library component is published;
|
|
7
|
+
* then set nodeId in code-connect/node-map.json and re-run generate-code-connect.
|
|
8
|
+
*/
|
|
9
|
+
figma.connect(DataGrid, 'https://www.figma.com/design/CS_FIGMA_FILE_KEY/CyberSkill?node-id=9999-26', {
|
|
10
|
+
example: () => <DataGrid />,
|
|
11
|
+
imports: ["import { DataGrid } from '@cyberskill/design'"],
|
|
12
|
+
})
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { makeT, useLang } from "../_i18n/i18n.js";
|
|
3
|
+
import { cx } from "../_utils/cx.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CyberSkill DataGrid — advanced table: sortable columns, selectable rows, sticky header,
|
|
7
|
+
* optional column pin + client filter + row virtualization + optional column order persistence.
|
|
8
|
+
*/
|
|
9
|
+
export function DataGrid({
|
|
10
|
+
columns = [],
|
|
11
|
+
rows = [],
|
|
12
|
+
rowKey = "id",
|
|
13
|
+
selectable = false,
|
|
14
|
+
selected = [],
|
|
15
|
+
onSelect,
|
|
16
|
+
height = 280,
|
|
17
|
+
caption,
|
|
18
|
+
empty,
|
|
19
|
+
lang,
|
|
20
|
+
className,
|
|
21
|
+
filterText,
|
|
22
|
+
filterKeys,
|
|
23
|
+
/** When true (or rows exceed virtualThreshold), only paint a window of rows. */
|
|
24
|
+
virtual = false,
|
|
25
|
+
/** Row threshold that auto-enables virtualization. Default 80. */
|
|
26
|
+
virtualThreshold = 80,
|
|
27
|
+
/** Approximate row height for windowing. Default 36. */
|
|
28
|
+
rowHeight = 36,
|
|
29
|
+
/** localStorage key — when set, column key order is persisted across reloads. */
|
|
30
|
+
persistKey,
|
|
31
|
+
}) {
|
|
32
|
+
const [sort, setSort] = React.useState(null); // {key, dir}
|
|
33
|
+
const [scrollTop, setScrollTop] = React.useState(0);
|
|
34
|
+
const [colOrder, setColOrder] = React.useState(() => {
|
|
35
|
+
if (!persistKey) return null;
|
|
36
|
+
try {
|
|
37
|
+
const raw = localStorage.getItem("cs:datagrid:cols:" + persistKey);
|
|
38
|
+
const arr = raw ? JSON.parse(raw) : null;
|
|
39
|
+
return Array.isArray(arr) ? arr : null;
|
|
40
|
+
} catch (e) { return null; }
|
|
41
|
+
});
|
|
42
|
+
const [ref, L] = useLang(lang);
|
|
43
|
+
const t = makeT("DataGrid", L);
|
|
44
|
+
|
|
45
|
+
const orderedColumns = React.useMemo(() => {
|
|
46
|
+
if (!colOrder || !colOrder.length) return columns;
|
|
47
|
+
const map = new Map(columns.map((c) => [c.key, c]));
|
|
48
|
+
const out = [];
|
|
49
|
+
for (const k of colOrder) if (map.has(k)) { out.push(map.get(k)); map.delete(k); }
|
|
50
|
+
for (const c of map.values()) out.push(c);
|
|
51
|
+
return out;
|
|
52
|
+
}, [columns, colOrder]);
|
|
53
|
+
|
|
54
|
+
const filtered = React.useMemo(() => {
|
|
55
|
+
const q = (filterText == null ? "" : String(filterText)).trim().toLowerCase();
|
|
56
|
+
if (!q) return rows;
|
|
57
|
+
const keys = filterKeys && filterKeys.length ? filterKeys : orderedColumns.map((c) => c.key);
|
|
58
|
+
return rows.filter((r) => keys.some((k) => String(r[k] == null ? "" : r[k]).toLowerCase().includes(q)));
|
|
59
|
+
}, [rows, filterText, filterKeys, orderedColumns]);
|
|
60
|
+
|
|
61
|
+
const sorted = React.useMemo(() => {
|
|
62
|
+
if (!sort) return filtered;
|
|
63
|
+
const col = orderedColumns.find((c) => c.key === sort.key);
|
|
64
|
+
const val = (r) => (col && col.sortValue ? col.sortValue(r) : r[sort.key]);
|
|
65
|
+
return [...filtered].sort((a, b) => { const x = val(a), y = val(b); return (x > y ? 1 : x < y ? -1 : 0) * (sort.dir === "asc" ? 1 : -1); });
|
|
66
|
+
}, [filtered, sort, orderedColumns]);
|
|
67
|
+
|
|
68
|
+
const useVirtual = virtual || sorted.length >= virtualThreshold;
|
|
69
|
+
const bodyH = Math.max(0, height - 40);
|
|
70
|
+
const start = useVirtual ? Math.max(0, Math.floor(scrollTop / rowHeight) - 4) : 0;
|
|
71
|
+
const visibleCount = useVirtual ? Math.ceil(bodyH / rowHeight) + 8 : sorted.length;
|
|
72
|
+
const end = useVirtual ? Math.min(sorted.length, start + visibleCount) : sorted.length;
|
|
73
|
+
const slice = sorted.slice(start, end);
|
|
74
|
+
const padTop = useVirtual ? start * rowHeight : 0;
|
|
75
|
+
const padBottom = useVirtual ? Math.max(0, (sorted.length - end) * rowHeight) : 0;
|
|
76
|
+
|
|
77
|
+
const allSel = selectable && filtered.length && filtered.every((r) => selected.includes(r[rowKey]));
|
|
78
|
+
const toggleAll = () => onSelect && onSelect(allSel ? [] : filtered.map((r) => r[rowKey]));
|
|
79
|
+
const toggle = (k) => onSelect && onSelect(selected.includes(k) ? selected.filter((x) => x !== k) : [...selected, k]);
|
|
80
|
+
|
|
81
|
+
const pinColumn = (key) => {
|
|
82
|
+
if (!persistKey) return;
|
|
83
|
+
const keys = orderedColumns.map((c) => c.key);
|
|
84
|
+
const next = [key, ...keys.filter((k) => k !== key)];
|
|
85
|
+
setColOrder(next);
|
|
86
|
+
try { localStorage.setItem("cs:datagrid:cols:" + persistKey, JSON.stringify(next)); } catch (e) {}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<div
|
|
91
|
+
ref={ref}
|
|
92
|
+
className={cx("cs-datagrid", useVirtual && "cs-datagrid--virtual", className)}
|
|
93
|
+
style={{ maxBlockSize: height, overflow: "auto" }}
|
|
94
|
+
onScroll={useVirtual ? (e) => setScrollTop(e.currentTarget.scrollTop) : undefined}
|
|
95
|
+
data-virtual={useVirtual ? "true" : "false"}
|
|
96
|
+
data-row-count={sorted.length}
|
|
97
|
+
>
|
|
98
|
+
<table className="cs-table">
|
|
99
|
+
{caption ? <caption>{caption}</caption> : null}
|
|
100
|
+
<thead>
|
|
101
|
+
<tr>
|
|
102
|
+
{selectable ? <th scope="col" className="cs-datagrid__selcol"><input type="checkbox" aria-label={t("selectAll")} checked={!!allSel} onChange={toggleAll} /></th> : null}
|
|
103
|
+
{orderedColumns.map((c) => (
|
|
104
|
+
<th
|
|
105
|
+
key={c.key}
|
|
106
|
+
scope="col"
|
|
107
|
+
className={c.pinned ? "cs-datagrid__pinned" : undefined}
|
|
108
|
+
style={c.pinned ? { position: "sticky", insetInlineStart: 0, zIndex: 1, background: "var(--cs-color-surface-panel)" } : undefined}
|
|
109
|
+
aria-sort={sort && sort.key === c.key ? (sort.dir === "asc" ? "ascending" : "descending") : undefined}
|
|
110
|
+
>
|
|
111
|
+
{c.sortable ? (
|
|
112
|
+
<button type="button" className="cs-datagrid__sort" onClick={() => setSort((s) => (!s || s.key !== c.key ? { key: c.key, dir: "asc" } : s.dir === "asc" ? { key: c.key, dir: "desc" } : null))}>
|
|
113
|
+
{c.header}<span aria-hidden="true">{sort && sort.key === c.key ? (sort.dir === "asc" ? " ▲" : " ▼") : " ↕"}</span>
|
|
114
|
+
</button>
|
|
115
|
+
) : c.header}
|
|
116
|
+
{persistKey ? (
|
|
117
|
+
<button type="button" className="cs-datagrid__pin" title="Pin column first" onClick={() => pinColumn(c.key)} aria-label={"Pin " + c.key}>⟂</button>
|
|
118
|
+
) : null}
|
|
119
|
+
</th>
|
|
120
|
+
))}
|
|
121
|
+
</tr>
|
|
122
|
+
</thead>
|
|
123
|
+
<tbody>
|
|
124
|
+
{sorted.length === 0 ? (
|
|
125
|
+
<tr><td colSpan={orderedColumns.length + (selectable ? 1 : 0)} className="cs-table__empty">{empty != null ? empty : t("empty")}</td></tr>
|
|
126
|
+
) : (
|
|
127
|
+
<>
|
|
128
|
+
{padTop > 0 ? <tr aria-hidden="true"><td colSpan={orderedColumns.length + (selectable ? 1 : 0)} style={{ height: padTop, padding: 0, border: 0 }} /></tr> : null}
|
|
129
|
+
{slice.map((r, i) => {
|
|
130
|
+
const k = r[rowKey] != null ? r[rowKey] : start + i;
|
|
131
|
+
return (
|
|
132
|
+
<tr key={k} className={selected.includes(k) ? "is-selected" : undefined} style={useVirtual ? { height: rowHeight } : undefined}>
|
|
133
|
+
{selectable ? <td className="cs-datagrid__selcol"><input type="checkbox" aria-label={t("selectRow")} checked={selected.includes(k)} onChange={() => toggle(k)} /></td> : null}
|
|
134
|
+
{orderedColumns.map((c) => (
|
|
135
|
+
<td key={c.key} className={c.pinned ? "cs-datagrid__pinned" : undefined} style={c.pinned ? { position: "sticky", insetInlineStart: 0, background: "var(--cs-color-surface-panel)" } : undefined}>
|
|
136
|
+
{c.render ? c.render(r) : r[c.key]}
|
|
137
|
+
</td>
|
|
138
|
+
))}
|
|
139
|
+
</tr>
|
|
140
|
+
);
|
|
141
|
+
})}
|
|
142
|
+
{padBottom > 0 ? <tr aria-hidden="true"><td colSpan={orderedColumns.length + (selectable ? 1 : 0)} style={{ height: padBottom, padding: 0, border: 0 }} /></tr> : null}
|
|
143
|
+
</>
|
|
144
|
+
)}
|
|
145
|
+
</tbody>
|
|
146
|
+
</table>
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
**DataGrid** — sortable + selectable table with sticky header.
|
|
2
|
+
|
|
3
|
+
```jsx
|
|
4
|
+
<DataGrid selectable selected={sel} onSelect={setSel} rowKey="key"
|
|
5
|
+
columns={[{key:"name",header:"Project",sortable:true},{key:"pct",header:"Progress",sortable:true}]} rows={rows}/>
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
**filterText / filterKeys / pinned:** client filter query, optional key subset, and sticky column pin.
|
|
9
|
+
|
|
10
|
+
**virtual / virtualThreshold / rowHeight:** windowed body rows for large datasets (auto when rows ≥ 80). Sets `data-virtual="true"` and `data-row-count`.
|
|
11
|
+
|
|
12
|
+
**persistKey:** stores column order in `localStorage` under `cs:datagrid:cols:<persistKey>`; pin control reorders a column to first.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
|
|
4
|
+
export interface DataTableColumn<Row> {
|
|
5
|
+
key: string;
|
|
6
|
+
header: ReactNode;
|
|
7
|
+
/** Custom cell renderer; defaults to row[key]. */
|
|
8
|
+
render?: (row: Row) => ReactNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Enterprise data table: caption, scoped column headers, per-column render, and
|
|
13
|
+
* an empty state. Dense content — keep it on a solid surface (no glass).
|
|
14
|
+
*/
|
|
15
|
+
export interface DataTableProps<Row extends Record<string, unknown>> {
|
|
16
|
+
caption?: ReactNode;
|
|
17
|
+
columns: DataTableColumn<Row>[];
|
|
18
|
+
rows: Row[];
|
|
19
|
+
/** Field used as React key. Default "id". */
|
|
20
|
+
rowKey?: keyof Row & string;
|
|
21
|
+
emptyState?: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function DataTable<Row extends Record<string, unknown>>(props: DataTableProps<Row>): React.ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import figma from '@figma/code-connect'
|
|
2
|
+
import { DataTable } from './DataTable.jsx'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Code Connect stub — DataTable
|
|
6
|
+
* Prop maps stay minimal until the matching Figma library component is published;
|
|
7
|
+
* then set nodeId in code-connect/node-map.json and re-run generate-code-connect.
|
|
8
|
+
*/
|
|
9
|
+
figma.connect(DataTable, 'https://www.figma.com/design/CS_FIGMA_FILE_KEY/CyberSkill?node-id=9999-27', {
|
|
10
|
+
example: () => <DataTable />,
|
|
11
|
+
imports: ["import { DataTable } from '@cyberskill/design'"],
|
|
12
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { makeT, useLang } from "../_i18n/i18n.js";
|
|
3
|
+
import { cx } from "../_utils/cx.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CyberSkill DataTable — semantic table with caption, column scope headers,
|
|
7
|
+
* per-column render, and an empty state. Solid surface (dense content).
|
|
8
|
+
*/
|
|
9
|
+
export function DataTable({
|
|
10
|
+
caption,
|
|
11
|
+
columns,
|
|
12
|
+
rows,
|
|
13
|
+
rowKey = "id",
|
|
14
|
+
emptyState,
|
|
15
|
+
lang,
|
|
16
|
+
className,
|
|
17
|
+
}) {
|
|
18
|
+
const normalized = Array.isArray(rows) ? rows : [];
|
|
19
|
+
const [ref, L] = useLang(lang);
|
|
20
|
+
const es = emptyState != null ? emptyState : makeT("DataTable", L)("empty");
|
|
21
|
+
return (
|
|
22
|
+
<div ref={ref} className={cx("cs-table-wrap", className)}>
|
|
23
|
+
<table className="cs-table">
|
|
24
|
+
{caption ? <caption>{caption}</caption> : null}
|
|
25
|
+
<thead>
|
|
26
|
+
<tr>{columns.map((c) => <th key={c.key} scope="col">{c.header}</th>)}</tr>
|
|
27
|
+
</thead>
|
|
28
|
+
<tbody>
|
|
29
|
+
{normalized.length === 0 ? (
|
|
30
|
+
<tr><td colSpan={columns.length} className="cs-table__empty">{es}</td></tr>
|
|
31
|
+
) : (
|
|
32
|
+
normalized.map((row, i) => (
|
|
33
|
+
<tr key={row[rowKey] ?? i}>
|
|
34
|
+
{columns.map((c) => <td key={c.key}>{c.render ? c.render(row) : row[c.key]}</td>)}
|
|
35
|
+
</tr>
|
|
36
|
+
))
|
|
37
|
+
)}
|
|
38
|
+
</tbody>
|
|
39
|
+
</table>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
**DataTable** — semantic table with a caption, scoped column headers, per-column `render`, and an empty state. Dense content, so it stays on a solid surface (never glass).
|
|
2
|
+
|
|
3
|
+
```jsx
|
|
4
|
+
<DataTable
|
|
5
|
+
caption="Releases"
|
|
6
|
+
columns={[
|
|
7
|
+
{ key: "ver", header: "Version" },
|
|
8
|
+
{ key: "date", header: "Ships" },
|
|
9
|
+
{ key: "status", header: "Status", render: (r) => <span className={`pill ${r.tone}`}>{r.status}</span> },
|
|
10
|
+
]}
|
|
11
|
+
rows={releases}
|
|
12
|
+
rowKey="ver"
|
|
13
|
+
emptyState="No releases yet"
|
|
14
|
+
/>
|
|
15
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
/** Table whose first column expands nested child rows. */
|
|
4
|
+
export interface TreeTableColumn<R = any> { key: string; header: ReactNode; render?: (row: R) => ReactNode; }
|
|
5
|
+
export interface TreeTableNode { key: string; children?: TreeTableNode[]; [field: string]: unknown; }
|
|
6
|
+
export interface TreeTableProps {
|
|
7
|
+
columns: TreeTableColumn[];
|
|
8
|
+
nodes: TreeTableNode[];
|
|
9
|
+
caption?: ReactNode;
|
|
10
|
+
defaultExpanded?: string[];
|
|
11
|
+
lang?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export function TreeTable(props: TreeTableProps): React.ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import figma from '@figma/code-connect'
|
|
2
|
+
import { TreeTable } from './TreeTable.jsx'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Code Connect stub — TreeTable
|
|
6
|
+
* Prop maps stay minimal until the matching Figma library component is published;
|
|
7
|
+
* then set nodeId in code-connect/node-map.json and re-run generate-code-connect.
|
|
8
|
+
*/
|
|
9
|
+
figma.connect(TreeTable, 'https://www.figma.com/design/CS_FIGMA_FILE_KEY/CyberSkill?node-id=9999-97', {
|
|
10
|
+
example: () => <TreeTable />,
|
|
11
|
+
imports: ["import { TreeTable } from '@cyberskill/design'"],
|
|
12
|
+
})
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { makeT, useLang } from "../_i18n/i18n.js";
|
|
3
|
+
import { cx } from "../_utils/cx.js";
|
|
4
|
+
|
|
5
|
+
function Row({ n, depth, columns, expanded, setExpanded }) {
|
|
6
|
+
const kids = n.children || [];
|
|
7
|
+
const open = expanded.includes(n.key);
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<tr>
|
|
11
|
+
{columns.map((c, i) => (
|
|
12
|
+
<td key={c.key}>
|
|
13
|
+
{i === 0 ? (
|
|
14
|
+
<span className="cs-treetable__cell" style={{ paddingInlineStart: depth * 18 }}>
|
|
15
|
+
{kids.length ? (
|
|
16
|
+
<button type="button" className="cs-tree__twist" aria-expanded={open} onClick={() => setExpanded(open ? expanded.filter((k) => k !== n.key) : [...expanded, n.key])}>{open ? "▾" : "▸"}</button>
|
|
17
|
+
) : <span className="cs-tree__twist" aria-hidden="true" />}
|
|
18
|
+
{c.render ? c.render(n) : n[c.key]}
|
|
19
|
+
</span>
|
|
20
|
+
) : (c.render ? c.render(n) : n[c.key])}
|
|
21
|
+
</td>
|
|
22
|
+
))}
|
|
23
|
+
</tr>
|
|
24
|
+
{open ? kids.map((k) => <Row key={k.key} n={k} depth={depth + 1} columns={columns} expanded={expanded} setExpanded={setExpanded} />) : null}
|
|
25
|
+
</>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** CyberSkill TreeTable — table whose first column expands nested rows. nodes: rows with children[]. */
|
|
30
|
+
export function TreeTable({ columns = [], nodes = [], caption, defaultExpanded = [], lang, className }) {
|
|
31
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
32
|
+
const [ref, L] = useLang(lang);
|
|
33
|
+
const t = makeT("DataGrid", L);
|
|
34
|
+
return (
|
|
35
|
+
<div ref={ref} className={cx("cs-table-wrap", className)}>
|
|
36
|
+
<table className="cs-table cs-treetable">
|
|
37
|
+
{caption ? <caption>{caption}</caption> : null}
|
|
38
|
+
<thead><tr>{columns.map((c) => <th key={c.key} scope="col">{c.header}</th>)}</tr></thead>
|
|
39
|
+
<tbody>
|
|
40
|
+
{nodes.length === 0
|
|
41
|
+
? <tr><td colSpan={columns.length} className="cs-table__empty">{t("empty")}</td></tr>
|
|
42
|
+
: nodes.map((n) => <Row key={n.key} n={n} depth={0} columns={columns} expanded={expanded} setExpanded={setExpanded} />)}
|
|
43
|
+
</tbody>
|
|
44
|
+
</table>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
**TreeTable** — expandable nested rows in a table.
|
|
2
|
+
|
|
3
|
+
```jsx
|
|
4
|
+
<TreeTable defaultExpanded={["p"]} columns={[{key:"name",header:"Item"},{key:"pct",header:"Progress"}]}
|
|
5
|
+
nodes={[{key:"p",name:"Platform",pct:"70%",children:[{key:"ds",name:"Design System",pct:"72%"}]}]}/>
|
|
6
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- @dsCard group="Components" viewport="700x300" name="DataTable" subtitle="Caption, scoped headers, custom cells, empty state" -->
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<link rel="stylesheet" href="../../styles.css" />
|
|
8
|
+
<style>
|
|
9
|
+
body { margin: 0; background: var(--cs-color-surface-page); padding: 22px 24px; }
|
|
10
|
+
.wrap { border: 1px solid var(--cs-color-border-default); border-radius: var(--cs-radius-lg); padding: 6px 16px 10px; background: var(--cs-color-surface-panel); max-width: 640px; }
|
|
11
|
+
.pill { display: inline-block; font: 700 11px/1 var(--cs-font-family-ui); text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
|
|
12
|
+
.pill.done { background: var(--cs-color-semantic-success); color: #fff; }
|
|
13
|
+
.pill.active { background: var(--cs-color-brand-ochre); color: var(--cs-color-brand-umber); }
|
|
14
|
+
.pill.hold { background: var(--cs-color-semantic-danger); color: #fff; }
|
|
15
|
+
.mono { font-family: var(--cs-font-family-mono); font-weight: 600; }
|
|
16
|
+
</style>
|
|
17
|
+
<script src="https://unpkg.com/react@18.3.1/umd/react.development.js" integrity="sha384-hD6/rw4ppMLGNu3tX5cjIb+uRZ7UkRJ6BPkLpg4hAu/6onKUg4lLsHAs9EBPT82L" crossorigin="anonymous"></script>
|
|
18
|
+
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js" integrity="sha384-u6aeetuaXnQ38mYT8rp6sbXaQe3NL9t+IBXmnYxwkUI2Hw4bsp2Wvmx4yRQF1uAm" crossorigin="anonymous"></script>
|
|
19
|
+
<script src="https://unpkg.com/@babel/standalone@7.29.0/babel.min.js" integrity="sha384-m08KidiNqLdpJqLq95G/LEi8Qvjl/xUYll3QILypMoQ65QorJ9Lvtp2RXYGBFj1y" crossorigin="anonymous"></script>
|
|
20
|
+
<script src="../../_ds_bundle.js"></script>
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<div id="root"></div>
|
|
24
|
+
<script type="text/babel">
|
|
25
|
+
const { DataTable } = (window[Object.keys(window).find(k=>/^CyberSkillDesignSystem_[0-9a-f]{6}$/.test(k))]||{});
|
|
26
|
+
const rows = [
|
|
27
|
+
{ ver: "v1.5.1", ships: "Shipped", status: "done", note: "Element packs" },
|
|
28
|
+
{ ver: "v1.6.0", ships: "This week", status: "active", note: "Glass bindings" },
|
|
29
|
+
{ ver: "v1.7.0", ships: "Q3 2026", status: "hold", note: "Awaiting RFC" },
|
|
30
|
+
];
|
|
31
|
+
function Demo() {
|
|
32
|
+
return (
|
|
33
|
+
<div className="wrap">
|
|
34
|
+
<DataTable
|
|
35
|
+
caption="Releases"
|
|
36
|
+
rowKey="ver"
|
|
37
|
+
columns={[
|
|
38
|
+
{ key: "ver", header: "Version", render: (r) => <span className="mono">{r.ver}</span> },
|
|
39
|
+
{ key: "ships", header: "Ships" },
|
|
40
|
+
{ key: "note", header: "Notes" },
|
|
41
|
+
{ key: "status", header: "Status", render: (r) => <span className={"pill " + r.status}>{r.status}</span> },
|
|
42
|
+
]}
|
|
43
|
+
rows={rows}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
ReactDOM.createRoot(document.getElementById("root")).render(<Demo />);
|
|
49
|
+
</script>
|
|
50
|
+
</body>
|
|
51
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Modal dialog: dimmed overlay + centred panel, aria-modal and labelled by its
|
|
6
|
+
* title. Overlay click calls onClose. Put Buttons in `actions`. On narrow
|
|
7
|
+
* viewports it goes near-fullscreen and actions stack.
|
|
8
|
+
*/
|
|
9
|
+
export interface DialogProps {
|
|
10
|
+
open: boolean;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/** Footer actions, typically Buttons. */
|
|
14
|
+
actions?: ReactNode;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
closeLabel?: string;
|
|
17
|
+
/** "en" | "vi" — else resolved from the nearest [lang] ancestor (vi default). */
|
|
18
|
+
lang?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function Dialog(props: DialogProps): React.ReactElement | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import figma from '@figma/code-connect'
|
|
2
|
+
import { Dialog } from './Dialog.jsx'
|
|
3
|
+
|
|
4
|
+
figma.connect(Dialog, 'https://www.figma.com/design/CS_FIGMA_FILE_KEY/CyberSkill?node-id=9999-30', {
|
|
5
|
+
props: {
|
|
6
|
+
open: figma.boolean('Open'),
|
|
7
|
+
title: figma.string('Title'),
|
|
8
|
+
children: figma.string('Body'),
|
|
9
|
+
},
|
|
10
|
+
example: (props) => <Dialog {...props} />,
|
|
11
|
+
imports: ["import { Dialog } from '@cyberskill/design'"],
|
|
12
|
+
})
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { makeT, useLang } from "../_i18n/i18n.js";
|
|
3
|
+
import { Icon } from "../icon/Icon.jsx";
|
|
4
|
+
import { cx } from "../_utils/cx.js";
|
|
5
|
+
|
|
6
|
+
const FOCUSABLE = [
|
|
7
|
+
'a[href]',
|
|
8
|
+
'area[href]',
|
|
9
|
+
'button:not([disabled])',
|
|
10
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
11
|
+
'select:not([disabled])',
|
|
12
|
+
'textarea:not([disabled])',
|
|
13
|
+
'audio[controls]',
|
|
14
|
+
'video[controls]',
|
|
15
|
+
'summary',
|
|
16
|
+
'iframe',
|
|
17
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
18
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
19
|
+
].join(",");
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* CyberSkill Dialog — modal overlay + panel. aria-modal, labelled by title and
|
|
23
|
+
* described by its body, scrim click closes. Body scroll is locked while open
|
|
24
|
+
* (prior overflow restored on close/unmount). Compose actions in the footer
|
|
25
|
+
* with Buttons.
|
|
26
|
+
*/
|
|
27
|
+
export function Dialog({
|
|
28
|
+
open,
|
|
29
|
+
title,
|
|
30
|
+
children,
|
|
31
|
+
actions,
|
|
32
|
+
onClose,
|
|
33
|
+
className,
|
|
34
|
+
closeLabel,
|
|
35
|
+
lang,
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
const baseId = React.useId();
|
|
39
|
+
const titleId = baseId + "-title";
|
|
40
|
+
const bodyId = children == null ? undefined : baseId + "-body";
|
|
41
|
+
const [ref, L] = useLang(lang);
|
|
42
|
+
const panel = React.useRef(null);
|
|
43
|
+
const closeRef = React.useRef(onClose); closeRef.current = onClose;
|
|
44
|
+
React.useEffect(() => {
|
|
45
|
+
if (!open) return;
|
|
46
|
+
const prev = document.activeElement;
|
|
47
|
+
const prevOverflow = document.body.style.overflow;
|
|
48
|
+
document.body.style.overflow = "hidden";
|
|
49
|
+
const focusables = () => (panel.current ? [...panel.current.querySelectorAll(FOCUSABLE)] : []);
|
|
50
|
+
const first = focusables()[0];
|
|
51
|
+
(first || panel.current) && (first || panel.current).focus();
|
|
52
|
+
const k = (e) => {
|
|
53
|
+
if (e.key === "Escape") { closeRef.current && closeRef.current(); return; }
|
|
54
|
+
if (e.key !== "Tab" || !panel.current) return;
|
|
55
|
+
const f = focusables();
|
|
56
|
+
if (!f.length) { e.preventDefault(); panel.current.focus(); return; }
|
|
57
|
+
const a = f[0], z = f[f.length - 1];
|
|
58
|
+
const active = document.activeElement;
|
|
59
|
+
const inside = panel.current.contains(active);
|
|
60
|
+
// Wrap at either edge; if focus somehow escaped the panel, pull it back in.
|
|
61
|
+
if (e.shiftKey && (!inside || active === a)) { e.preventDefault(); z.focus(); }
|
|
62
|
+
else if (!e.shiftKey && (!inside || active === z)) { e.preventDefault(); a.focus(); }
|
|
63
|
+
};
|
|
64
|
+
document.addEventListener("keydown", k);
|
|
65
|
+
return () => {
|
|
66
|
+
document.removeEventListener("keydown", k);
|
|
67
|
+
document.body.style.overflow = prevOverflow;
|
|
68
|
+
if (prev && prev.focus) prev.focus();
|
|
69
|
+
};
|
|
70
|
+
}, [open]);
|
|
71
|
+
const cl = closeLabel != null ? closeLabel : makeT("Dialog", L)("close");
|
|
72
|
+
if (!open) return null;
|
|
73
|
+
return (
|
|
74
|
+
<div ref={ref} className="cs-dialog-layer">
|
|
75
|
+
<div className="cs-dialog__overlay" onClick={onClose} aria-hidden="true" />
|
|
76
|
+
<section
|
|
77
|
+
{...props}
|
|
78
|
+
ref={panel}
|
|
79
|
+
tabIndex={-1}
|
|
80
|
+
role="dialog"
|
|
81
|
+
aria-modal="true"
|
|
82
|
+
aria-labelledby={titleId}
|
|
83
|
+
aria-describedby={bodyId != null ? bodyId : props["aria-describedby"]}
|
|
84
|
+
className={cx("cs-dialog", className)}
|
|
85
|
+
>
|
|
86
|
+
<header className="cs-dialog__header">
|
|
87
|
+
<h2 id={titleId} className="cs-dialog__title">{title}</h2>
|
|
88
|
+
{onClose ? (
|
|
89
|
+
<button type="button" className="cs-button cs-button--ghost cs-button--sm" onClick={onClose} aria-label={cl}>
|
|
90
|
+
<Icon name="close" size="sm" />
|
|
91
|
+
</button>
|
|
92
|
+
) : null}
|
|
93
|
+
</header>
|
|
94
|
+
<div id={bodyId} className="cs-dialog__body">{children}</div>
|
|
95
|
+
{actions ? <footer className="cs-dialog__actions">{actions}</footer> : null}
|
|
96
|
+
</section>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
**Dialog** — modal overlay + centred panel. `aria-modal`, labelled by title, overlay-click closes. Compose footer actions with `Button`s. Goes near-fullscreen on narrow viewports.
|
|
2
|
+
|
|
3
|
+
```jsx
|
|
4
|
+
<Dialog
|
|
5
|
+
open={open}
|
|
6
|
+
title="Send your wish?"
|
|
7
|
+
onClose={() => setOpen(false)}
|
|
8
|
+
actions={<>
|
|
9
|
+
<Button variant="secondary" onClick={() => setOpen(false)}>Not now</Button>
|
|
10
|
+
<Button onClick={submit}>Send wish</Button>
|
|
11
|
+
</>}
|
|
12
|
+
>
|
|
13
|
+
A real person on the team replies within one business day.
|
|
14
|
+
</Dialog>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- Pair with Heavy Glass (`className="cs-surface-heavy"`) only after checking APCA against the backdrop.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!-- @dsCard group="Components" viewport="700x320" name="Dialog" subtitle="Modal overlay + panel with footer actions" -->
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<link rel="stylesheet" href="../../styles.css" />
|
|
8
|
+
<style>
|
|
9
|
+
body { margin: 0; background: var(--cs-color-surface-page); padding: 22px 24px; }
|
|
10
|
+
/* Scope the fixed dialog layer to the preview frame so it renders inline in the card. */
|
|
11
|
+
.frame { position: relative; height: 256px; border: 1px solid var(--cs-color-border-default); border-radius: var(--cs-radius-lg); overflow: hidden; background: var(--cs-color-surface-raised); }
|
|
12
|
+
.frame .cs-dialog-layer { position: absolute; }
|
|
13
|
+
.frame .cs-dialog { top: 24px; }
|
|
14
|
+
</style>
|
|
15
|
+
<script src="https://unpkg.com/react@18.3.1/umd/react.development.js" integrity="sha384-hD6/rw4ppMLGNu3tX5cjIb+uRZ7UkRJ6BPkLpg4hAu/6onKUg4lLsHAs9EBPT82L" crossorigin="anonymous"></script>
|
|
16
|
+
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js" integrity="sha384-u6aeetuaXnQ38mYT8rp6sbXaQe3NL9t+IBXmnYxwkUI2Hw4bsp2Wvmx4yRQF1uAm" crossorigin="anonymous"></script>
|
|
17
|
+
<script src="https://unpkg.com/@babel/standalone@7.29.0/babel.min.js" integrity="sha384-m08KidiNqLdpJqLq95G/LEi8Qvjl/xUYll3QILypMoQ65QorJ9Lvtp2RXYGBFj1y" crossorigin="anonymous"></script>
|
|
18
|
+
<script src="../../_ds_bundle.js"></script>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div id="root"></div>
|
|
22
|
+
<script type="text/babel">
|
|
23
|
+
const { Dialog, Button } = (window[Object.keys(window).find(k=>/^CyberSkillDesignSystem_[0-9a-f]{6}$/.test(k))]||{});
|
|
24
|
+
function Demo() {
|
|
25
|
+
const [open, setOpen] = React.useState(true);
|
|
26
|
+
return (
|
|
27
|
+
<div className="frame">
|
|
28
|
+
{!open && <div style={{padding:24}}><Button onClick={() => setOpen(true)}>Open dialog</Button></div>}
|
|
29
|
+
<Dialog
|
|
30
|
+
open={open}
|
|
31
|
+
title="Send your wish?"
|
|
32
|
+
onClose={() => setOpen(false)}
|
|
33
|
+
actions={<>
|
|
34
|
+
<Button variant="secondary" onClick={() => setOpen(false)}>Not now</Button>
|
|
35
|
+
<Button onClick={() => setOpen(false)}>Send wish</Button>
|
|
36
|
+
</>}
|
|
37
|
+
>
|
|
38
|
+
A real person on the team replies within one business day. We never share your details.
|
|
39
|
+
</Dialog>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
ReactDOM.createRoot(document.getElementById("root")).render(<Demo />);
|
|
44
|
+
</script>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|