= ({ children }) => {
7 | return (
8 |
9 | {children}
10 |
11 | );
12 | };
13 |
14 | export default Preview;
15 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/logout.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/printer.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/bell.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/chevron-left-fill.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/chevron-up-fill.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/star-fill.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/standard/app/api/search/route.ts:
--------------------------------------------------------------------------------
1 | import { source } from "@/app/source";
2 | import { createSearchAPI } from "fumadocs-core/search/server";
3 |
4 | export const { GET } = createSearchAPI("advanced", {
5 | indexes: source.getPages().map((page) => ({
6 | title: page.data.title,
7 | description: page.data.description,
8 | structuredData: page.data.structuredData,
9 | id: page.url,
10 | url: page.url,
11 | })),
12 | });
13 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/download.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/info.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "tsup";
2 |
3 | export default defineConfig((options) => ({
4 | ...options,
5 | entryPoints: [
6 | "src/components/**/*.tsx",
7 | "src/hooks/index.ts",
8 | "src/utils/index.ts",
9 | "src/icons/index.ts",
10 | ],
11 | format: ["cjs", "esm"],
12 | clean: true,
13 | dts: true,
14 | sourcemap: true,
15 | external: ["react"],
16 | minify: true,
17 | }));
18 |
--------------------------------------------------------------------------------
/apps/docs/app/api/search/route.ts:
--------------------------------------------------------------------------------
1 | import { source } from "@/app/[lang]/source";
2 | import { createSearchAPI } from "fumadocs-core/search/server";
3 |
4 | export const { GET } = createSearchAPI("advanced", {
5 | indexes: source.getPages().map((page) => ({
6 | title: page.data.title,
7 | description: page.data.description,
8 | structuredData: page.data.structuredData,
9 | id: page.url,
10 | url: page.url,
11 | })),
12 | });
13 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/minus-circle.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/reload.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/search.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/standard/lib/constant.ts:
--------------------------------------------------------------------------------
1 | export const links = {
2 | figma:
3 | "https://www.figma.com/design/svmWSPZarzWrJ116CQ8zpV/MYDS-(Beta)?node-id=7-20696",
4 | standard: "https://standard.digital.gov.my/",
5 | github: "https://github.com/govtechmy/myds",
6 | github_issue: "https://github.com/govtechmy/myds/issues",
7 | };
8 |
9 | export const s3 = (path: string) => {
10 | return `https://gnu-myds.s3.ap-southeast-1.amazonaws.com${path}`;
11 | };
12 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/document.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/email.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/plus-circle.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/twitter-x.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/docs/public/assets/icons/about-icon3.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/cross-circle.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/warning-circle.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/zoom-out.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/docs/public/assets/icons/about-icon1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/docs/public/sitemap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | https://design.digital.gov.my
4 | 2024-07-24T04:38:06.381Z
5 | daily
6 | 1
7 |
8 |
9 | design.digital.gov.my/ms-MY
10 | 2024-07-24T04:38:06.381Z
11 | daily
12 | 1
13 |
14 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/expand.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/document-minus.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/zoom-in.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/document-add.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/document-filled.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/input-field.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/lock.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/swap.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/docs/components/analytics.tsx:
--------------------------------------------------------------------------------
1 | import Script from "next/script";
2 | import { FunctionComponent } from "react";
3 |
4 | const Analytics: FunctionComponent = () => {
5 | if (process.env.APP_ENV !== "production") return null;
6 | return (
7 |
13 | );
14 | };
15 |
16 | export default Analytics;
17 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/warning.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/docs/components/Paragraph.tsx:
--------------------------------------------------------------------------------
1 | import { clx } from "@govtechmy/myds-react/utils";
2 | import { ReactNode } from "react";
3 |
4 | type Props = {
5 | className?: string;
6 | children: ReactNode;
7 | };
8 |
9 | export function Paragraph(props: Props) {
10 | return (
11 |
17 | {props.children}
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/direction.tsx:
--------------------------------------------------------------------------------
1 | export default function Direction({ ...props }) {
2 | return (
3 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/apps/standard/components/Paragraph.tsx:
--------------------------------------------------------------------------------
1 | import { clx } from "@govtechmy/myds-react/utils";
2 | import { ReactNode } from "react";
3 |
4 | type Props = {
5 | className?: string;
6 | children: ReactNode;
7 | };
8 |
9 | export function Paragraph(props: Props) {
10 | return (
11 |
17 | {props.children}
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/icons/direction.tsx:
--------------------------------------------------------------------------------
1 | export default function Direction({ ...props }) {
2 | return (
3 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/button.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/calendar.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/folder.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/legacy-mini-ambulance-mers.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/apps/docs/components/Tag.tsx:
--------------------------------------------------------------------------------
1 | import { clx } from "@govtechmy/myds-react/utils";
2 | import { ReactNode } from "react";
3 |
4 | type Props = {
5 | className?: string;
6 | children: ReactNode;
7 | };
8 |
9 | export function Tag(props: Props) {
10 | return (
11 |
17 | {props.children}
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/chevron-down.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronDown({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/chevron-up.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronUp({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/components/Tag.tsx:
--------------------------------------------------------------------------------
1 | import { clx } from "@govtechmy/myds-react/utils";
2 | import { ReactNode } from "react";
3 |
4 | type Props = {
5 | className?: string;
6 | children: ReactNode;
7 | };
8 |
9 | export function Tag(props: Props) {
10 | return (
11 |
17 | {props.children}
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/chevron-left.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronLeft({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/chevron-right.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronRight({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/icons/chevron-down.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronDown({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/icons/chevron-up.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronUp({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/icons/chevron-left.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronLeft({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/icons/chevron-right.tsx:
--------------------------------------------------------------------------------
1 | export default function ChevronRight({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/check-circle.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/check-shield.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/lock-2.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/.eslintrc.js:
--------------------------------------------------------------------------------
1 | const path = require("path");
2 |
3 | module.exports = {
4 | extends: ["@myds/eslint-config/react-internal.js"],
5 | ignorePatterns: [
6 | "dist/",
7 | "node_modules/",
8 | ".next/",
9 | "coverage/",
10 | "tsup.config.ts",
11 | ],
12 | // To fix the issue where the tsconfig is being looked at the root directory
13 | // https://github.com/microsoft/vscode-eslint/issues/1170
14 | parserOptions: {
15 | project: path.resolve(__dirname, "tsconfig.json"),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/copy.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/folder-minus.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/docs/icons/arrow-back.tsx:
--------------------------------------------------------------------------------
1 | export default function ArrowBack({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/cross-x.tsx:
--------------------------------------------------------------------------------
1 | export default function CrossX({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/.changeset/README.md:
--------------------------------------------------------------------------------
1 | # Changesets
2 |
3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4 | with multi-package repos, or single-package repos to help you version and publish your code. You can
5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6 |
7 | We have a quick list of common questions to get you started engaging with this project in
8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 |
--------------------------------------------------------------------------------
/apps/standard/icons/arrow-back.tsx:
--------------------------------------------------------------------------------
1 | export default function ArrowBack({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/icons/cross-x.tsx:
--------------------------------------------------------------------------------
1 | export default function CrossX({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/edit.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/folder-plus.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/react/src/svg/icons/trash.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/apps/docs/icons/arrow-forward.tsx:
--------------------------------------------------------------------------------
1 | export default function ArrowForward({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/arrow-outgoing.tsx:
--------------------------------------------------------------------------------
1 | export default function ArrowOutgoing({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/docs/icons/bolt.tsx:
--------------------------------------------------------------------------------
1 | export default function Bolt({ ...props }) {
2 | return (
3 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/apps/standard/components/myds.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { Button } from "@govtechmy/myds-react/button";
4 | import { ComponentProps, FunctionComponent } from "react";
5 | export * from "@govtechmy/myds-react/button";
6 | export * from "@govtechmy/myds-react/link";
7 |
8 | interface PreviewButtonProps extends ComponentProps {
9 | pantun: string;
10 | }
11 |
12 | export const PreviewButton: FunctionComponent = (props) => {
13 | return