@ceed/cds 1.24.1-next.2 → 1.24.1-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
  2. package/dist/components/CurrencyInput/hooks/use-currency-setting.d.ts +2 -2
  3. package/dist/components/data-display/DataTable.md +1 -1
  4. package/dist/components/data-display/InfoSign.md +91 -74
  5. package/dist/components/data-display/Typography.md +94 -411
  6. package/dist/components/feedback/Dialog.md +62 -76
  7. package/dist/components/feedback/Modal.md +138 -430
  8. package/dist/components/feedback/llms.txt +0 -2
  9. package/dist/components/index.d.ts +0 -1
  10. package/dist/components/inputs/Autocomplete.md +107 -356
  11. package/dist/components/inputs/ButtonGroup.md +104 -115
  12. package/dist/components/inputs/CurrencyInput.md +5 -183
  13. package/dist/components/inputs/DatePicker.md +431 -108
  14. package/dist/components/inputs/DateRangePicker.md +492 -131
  15. package/dist/components/inputs/FilterableCheckboxGroup.md +19 -145
  16. package/dist/components/inputs/IconButton.md +88 -137
  17. package/dist/components/inputs/Input.md +73 -204
  18. package/dist/components/inputs/MonthPicker.md +422 -95
  19. package/dist/components/inputs/MonthRangePicker.md +466 -89
  20. package/dist/components/inputs/PercentageInput.md +16 -185
  21. package/dist/components/inputs/RadioButton.md +35 -163
  22. package/dist/components/inputs/Select.md +326 -222
  23. package/dist/components/inputs/Switch.md +376 -143
  24. package/dist/components/inputs/Textarea.md +10 -213
  25. package/dist/components/inputs/Uploader/Uploader.md +66 -145
  26. package/dist/components/inputs/llms.txt +0 -4
  27. package/dist/components/navigation/Breadcrumbs.md +308 -57
  28. package/dist/components/navigation/Drawer.md +0 -180
  29. package/dist/components/navigation/Dropdown.md +215 -98
  30. package/dist/components/navigation/IconMenuButton.md +502 -40
  31. package/dist/components/navigation/InsetDrawer.md +650 -281
  32. package/dist/components/navigation/Link.md +348 -31
  33. package/dist/components/navigation/Menu.md +285 -92
  34. package/dist/components/navigation/MenuButton.md +448 -55
  35. package/dist/components/navigation/Pagination.md +338 -47
  36. package/dist/components/navigation/Stepper.md +28 -160
  37. package/dist/components/navigation/Tabs.md +316 -57
  38. package/dist/components/surfaces/Accordions.md +804 -49
  39. package/dist/components/surfaces/Card.md +157 -97
  40. package/dist/components/surfaces/Divider.md +234 -83
  41. package/dist/components/surfaces/Sheet.md +328 -153
  42. package/dist/index.cjs +371 -617
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.js +342 -532
  45. package/dist/llms.txt +0 -9
  46. package/framer/index.js +163 -1
  47. package/package.json +24 -33
  48. package/README.md +0 -51
  49. package/dist/chunks/rehype-accent-FZRUD7VI.js +0 -39
  50. package/dist/components/RadioTileGroup/RadioTileGroup.d.ts +0 -56
  51. package/dist/components/RadioTileGroup/index.d.ts +0 -3
  52. package/dist/components/feedback/CircularProgress.md +0 -257
  53. package/dist/components/feedback/Skeleton.md +0 -280
  54. package/dist/components/inputs/FormControl.md +0 -361
  55. package/dist/components/inputs/RadioList.md +0 -241
  56. package/dist/components/inputs/RadioTileGroup.md +0 -507
  57. package/dist/components/inputs/Slider.md +0 -334
  58. package/dist/guides/ThemeProvider.md +0 -89
  59. package/dist/guides/llms.txt +0 -9
  60. package/dist/index.browser.js +0 -224
  61. package/dist/index.browser.js.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/cds",
3
- "version": "1.24.1-next.2",
3
+ "version": "1.24.1-next.3",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,12 +11,9 @@
11
11
  "storybook": "storybook dev -p 6006",
12
12
  "test-storybook": "vitest --project=storybook",
13
13
  "build-storybook": "storybook build --webpack-stats-json",
14
- "build": "yarn build-for-framer && rm -rf ./dist && tsc --emitDeclarationOnly -p tsconfig.build.json && yarn build:esm && yarn build:cjs && yarn build:browser:prod && yarn generate:dist-llms",
15
- "test:build": "vitest run --project=build-validation",
16
- "build:esm": "node esbuild.esm.mjs",
17
- "build:cjs": "node esbuild.cjs.mjs",
18
- "build:browser": "node esbuild.browser.mjs",
19
- "build:browser:prod": "NODE_ENV=production node esbuild.browser.mjs",
14
+ "build": "yarn build-for-framer && rm -rf ./dist && tsc --emitDeclarationOnly -p tsconfig.build.json && yarn build:esm && yarn build:cjs && yarn generate:dist-llms",
15
+ "build:esm": "yarn esbuild src/index.ts --bundle --outfile='dist/index.js' --format=esm '--packages=external' --tsconfig=tsconfig.build.json",
16
+ "build:cjs": "yarn esbuild src/index.ts --bundle --outfile='dist/index.cjs' --format=cjs '--packages=external' --tsconfig=tsconfig.build.json",
20
17
  "build-for-framer": "yarn esbuild src/framer-entrypoint.ts --bundle --outfile='framer/index.js' --format=esm '--external:react' '--external:react/jsx-runtime' '--external:react-dom' '--external:framer' '--external:framer-motion' --main-fields=module,main --target=chrome58 --minify",
21
18
  "prepack": "yarn build",
22
19
  "lint": "oxlint && eslint \"./src/**/*.{ts,tsx}\"",
@@ -31,32 +28,25 @@
31
28
  ".": {
32
29
  "import": "./dist/index.js",
33
30
  "require": "./dist/index.cjs"
34
- },
35
- "./browser": {
36
- "import": "./dist/index.browser.js"
37
31
  }
38
32
  },
39
33
  "author": "Ecube Labs",
40
34
  "sideEffects": false,
41
35
  "license": "MIT",
42
36
  "peerDependencies": {
43
- "@emotion/react": "^11.5.0",
44
- "@emotion/styled": "^11.3.0",
45
- "@mui/icons-material": "^6.1.0",
46
- "@mui/joy": ">=5.0.0-beta.32 <6.0.0-0",
47
- "framer-motion": "^11.0.3",
48
- "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
49
- "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
50
- },
51
- "peerDependenciesMeta": {
52
- "@mui/icons-material": {
53
- "optional": true
54
- }
37
+ "react": "^17.0.0 || ^18.0.0",
38
+ "react-dom": "^17.0.0 || ^18.0.0"
55
39
  },
56
40
  "dependencies": {
57
41
  "@atlaskit/pragmatic-drag-and-drop": "^1.2.1",
58
- "@babel/runtime": "^7.23.9",
42
+ "@emotion/react": "^11.11.0",
43
+ "@emotion/styled": "^11.11.0",
44
+ "@mui/base": "5.0.0-beta.40",
45
+ "@mui/icons-material": "^6.1.0",
46
+ "@mui/joy": "^5.0.0-beta.32",
59
47
  "@tanstack/react-virtual": "^3.4.0",
48
+ "framer-motion": "^11.0.3",
49
+ "intl-messageformat": "^10.0.0",
60
50
  "react-imask": "^7.5.0",
61
51
  "react-markdown": "^9.0.1",
62
52
  "react-number-format": "^5.0.0",
@@ -64,27 +54,28 @@
64
54
  "unist-util-visit": "^5.0.0"
65
55
  },
66
56
  "devDependencies": {
67
- "@chromatic-com/storybook": "^5.0.1",
57
+ "@chromatic-com/storybook": "^4.0.1",
68
58
  "@ecubelabs/prettier-config": "^0.0.8",
69
59
  "@ecubelabs/tsconfig": "^1.0.0",
70
60
  "@mui/material": "^5.15.10",
71
61
  "@prettier/plugin-oxc": "^0.0.4",
72
- "@storybook/addon-a11y": "^10.2.19",
73
- "@storybook/addon-docs": "^10.2.19",
74
- "@storybook/addon-links": "^10.2.19",
75
- "@storybook/addon-vitest": "^10.2.19",
76
- "@storybook/react-vite": "^10.2.19",
62
+ "@storybook/addon-a11y": "^9.0.18",
63
+ "@storybook/addon-docs": "^9.0.18",
64
+ "@storybook/addon-links": "^9.0.18",
65
+ "@storybook/addon-vitest": "^9.0.18",
66
+ "@storybook/builder-vite": "^9.0.18",
67
+ "@storybook/react-vite": "^9.0.18",
77
68
  "@types/unist": "^3.0.2",
78
69
  "@vitest/browser": "^3.2.4",
79
70
  "@vitest/coverage-v8": "^3.2.4",
80
- "esbuild": "^0.27.0",
71
+ "esbuild": "^0.25.0",
81
72
  "eslint": "^8.46.0",
82
73
  "eslint-config-prettier": "^10.1.5",
83
74
  "eslint-plugin-oxlint": "^1.9.0",
84
75
  "eslint-plugin-prettier": "^5.5.1",
85
76
  "eslint-plugin-react": "^7.34.1",
86
77
  "eslint-plugin-react-hooks": "^4.6.2",
87
- "eslint-plugin-storybook": "10.2.19",
78
+ "eslint-plugin-storybook": "9.0.18",
88
79
  "framer": "^2.4.1",
89
80
  "oxlint": "^1.9.0",
90
81
  "playwright": "^1.54.1",
@@ -93,10 +84,10 @@
93
84
  "react-dom": "^18.2.0",
94
85
  "semantic-release": "^24.2.1",
95
86
  "semantic-release-yarn": "^3.0.2",
96
- "storybook": "^10.2.19",
87
+ "storybook": "^9.0.18",
97
88
  "turbo": "^2.5.6",
98
89
  "typescript": "^5.3.3",
99
- "vite": "^7.3.1",
90
+ "vite": "^7.1.11",
100
91
  "vitest": "^3.2.4"
101
92
  },
102
93
  "repository": {
package/README.md DELETED
@@ -1,51 +0,0 @@
1
- # @ceed/cds
2
-
3
- Client Design System - A React component library for Ecube Labs client applications.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @ceed/cds
9
- # or
10
- yarn add @ceed/cds
11
- ```
12
-
13
- ### Peer Dependencies
14
-
15
- `@ceed/cds` requires the following peer dependencies to be installed in your app.
16
- You can skip any packages that are already installed.
17
-
18
- ```bash
19
- npm install @emotion/react @emotion/styled @mui/joy framer-motion
20
- # If using icon components:
21
- npm install @mui/icons-material
22
- ```
23
-
24
- | Package | Required | Note |
25
- |---|---|---|
26
- | `@emotion/react` | Yes | MUI Joy rendering engine |
27
- | `@emotion/styled` | Yes | MUI Joy styling engine |
28
- | `@mui/joy` | Yes | Design system foundation (includes ThemeProvider) |
29
- | `framer-motion` | Yes | Animation components |
30
- | `@mui/icons-material` | Optional | Only needed for icon-based components |
31
-
32
- ## Usage
33
-
34
- ### With Bundler (Vite, Webpack, etc.)
35
-
36
- ```tsx
37
- import { Button, ThemeProvider } from '@ceed/cds';
38
-
39
- function App() {
40
- return (
41
- <ThemeProvider>
42
- <Button variant="solid">Click me</Button>
43
- </ThemeProvider>
44
- );
45
- }
46
- ```
47
-
48
- ## Documentation
49
-
50
- - [Storybook](https://main--66da7aaaf87fb0b864d6afca.chromatic.com)
51
- - [Confluence](https://ecubelabs.atlassian.net/wiki/spaces/HP/pages/3256123430/Design+System)
@@ -1,39 +0,0 @@
1
- // src/libs/rehype-accent/index.ts
2
- import { visit } from "unist-util-visit";
3
- function rehypeAccent(options) {
4
- const { accentColor } = options;
5
- return (tree) => {
6
- visit(tree, "text", (node, index, parent) => {
7
- const value = node.value;
8
- const regex = /\|\|.*?\|\|/g;
9
- let match;
10
- let lastIndex = 0;
11
- const newNodes = [];
12
- while ((match = regex.exec(value)) !== null) {
13
- if (match.index > lastIndex) {
14
- newNodes.push({
15
- type: "text",
16
- value: value.slice(lastIndex, match.index)
17
- });
18
- }
19
- const innerText = match[0].split("||")[1];
20
- newNodes.push({
21
- type: "element",
22
- tagName: "span",
23
- properties: { textColor: accentColor },
24
- children: [{ type: "text", value: innerText }]
25
- });
26
- lastIndex = match.index + match[0].length;
27
- }
28
- if (lastIndex < value.length) {
29
- newNodes.push({ type: "text", value: value.slice(lastIndex) });
30
- }
31
- if (newNodes.length) {
32
- parent.children.splice(index, 1, ...newNodes);
33
- }
34
- });
35
- };
36
- }
37
- export {
38
- rehypeAccent
39
- };
@@ -1,56 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import type { SxProps } from '@mui/joy/styles/types';
3
- export interface RadioTileOption<T = string> {
4
- value: T;
5
- label: ReactNode;
6
- disabled?: boolean;
7
- startDecorator?: ReactNode;
8
- }
9
- export interface RadioTileGroupProps<T = string> {
10
- /**
11
- * @default 'sm'
12
- */
13
- size?: 'sm' | 'md' | 'lg';
14
- options: RadioTileOption<T>[];
15
- value?: T;
16
- defaultValue?: T;
17
- name?: string;
18
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
19
- sx?: SxProps;
20
- disabled?: boolean;
21
- className?: string;
22
- useIndicator?: boolean;
23
- flex?: boolean;
24
- /**
25
- * 지정하지 않으면 한 row에 모든 옵션이 렌더링된다.
26
- * - 특정 rows 이내로 렌더링 하고 싶으면 `columns: Math.ceil(options.length / 원하는 rows)`로 설정할 수 있다.
27
- * - 수직으로 렌더링 하고 싶으면 `columns: 1`로 설정할 수 있다.
28
- * - `flex` 옵션과 함께 사용할수 있다.
29
- */
30
- columns?: number;
31
- /**
32
- * @default 'center'
33
- */
34
- textAlign?: 'start' | 'center';
35
- /**
36
- * Label for the RadioTileGroup
37
- */
38
- label?: React.ReactNode;
39
- /**
40
- * Helper text for the RadioTileGroup
41
- */
42
- helperText?: React.ReactNode;
43
- /**
44
- * Whether the RadioTileGroup has an error
45
- */
46
- error?: boolean;
47
- /**
48
- * Whether the RadioTileGroup is required
49
- */
50
- required?: boolean;
51
- }
52
- declare function RadioTileGroup<T extends string | number = string>(props: RadioTileGroupProps<T>): React.JSX.Element;
53
- declare namespace RadioTileGroup {
54
- var displayName: string;
55
- }
56
- export { RadioTileGroup };
@@ -1,3 +0,0 @@
1
- import { RadioTileGroup } from './RadioTileGroup';
2
- export * from './RadioTileGroup';
3
- export default RadioTileGroup;
@@ -1,257 +0,0 @@
1
- # CircularProgress
2
-
3
- ## Introduction
4
-
5
- The CircularProgress component displays a circular loading indicator. It is based on Joy UI's CircularProgress and supports both indeterminate (spinning) and determinate (progress percentage) modes. Use it to provide visual feedback during asynchronous operations like data fetching, file uploads, or form submissions.
6
-
7
- ```tsx
8
- <CircularProgress />
9
- ```
10
-
11
- | Field | Description | Default |
12
- | ----------- | ----------- | ------- |
13
- | size | — | — |
14
- | color | — | — |
15
- | variant | — | — |
16
- | value | — | — |
17
- | determinate | — | — |
18
- | thickness | — | — |
19
-
20
- ## Usage
21
-
22
- ```tsx
23
- import { CircularProgress } from '@ceed/cds';
24
-
25
- function MyComponent() {
26
- return <CircularProgress />;
27
- }
28
- ```
29
-
30
- ## Sizes
31
-
32
- CircularProgress supports three sizes: `sm`, `md` (default), and `lg`.
33
-
34
- ```tsx
35
- <>
36
- <CircularProgress size="sm" />
37
- <CircularProgress size="md" />
38
- <CircularProgress size="lg" />
39
- </>
40
- ```
41
-
42
- ```tsx
43
- <CircularProgress size="sm" />
44
- <CircularProgress size="md" />
45
- <CircularProgress size="lg" />
46
- ```
47
-
48
- ## Colors
49
-
50
- Five semantic colors are available via the `color` prop. The default is `primary`.
51
-
52
- ```tsx
53
- <>
54
- <CircularProgress color="primary" />
55
- <CircularProgress color="neutral" />
56
- <CircularProgress color="danger" />
57
- <CircularProgress color="success" />
58
- <CircularProgress color="warning" />
59
- </>
60
- ```
61
-
62
- ```tsx
63
- <CircularProgress color="primary" />
64
- <CircularProgress color="neutral" />
65
- <CircularProgress color="danger" />
66
- <CircularProgress color="success" />
67
- <CircularProgress color="warning" />
68
- ```
69
-
70
- ## Variants
71
-
72
- Four visual variants are supported: `solid`, `soft` (default), `outlined`, and `plain`.
73
-
74
- ```tsx
75
- <>
76
- <CircularProgress variant="solid" />
77
- <CircularProgress variant="soft" />
78
- <CircularProgress variant="outlined" />
79
- <CircularProgress variant="plain" />
80
- </>
81
- ```
82
-
83
- ```tsx
84
- <CircularProgress variant="solid" />
85
- <CircularProgress variant="soft" />
86
- <CircularProgress variant="outlined" />
87
- <CircularProgress variant="plain" />
88
- ```
89
-
90
- ## Determinate Mode
91
-
92
- Set `determinate` to `true` and provide a `value` (0–100) to display specific progress.
93
-
94
- ```tsx
95
- <>
96
- <CircularProgress determinate value={25} />
97
- <CircularProgress determinate value={50} />
98
- <CircularProgress determinate value={75} />
99
- <CircularProgress determinate value={100} />
100
- </>
101
- ```
102
-
103
- ```tsx
104
- <CircularProgress determinate value={25} />
105
- <CircularProgress determinate value={50} />
106
- <CircularProgress determinate value={75} />
107
- <CircularProgress determinate value={100} />
108
- ```
109
-
110
- ## With Label
111
-
112
- Pass children to display a label inside the progress ring. This is useful for showing the current percentage.
113
-
114
- ```tsx
115
- <CircularProgress determinate value={66}>
116
- <Typography level="body-xs">66%</Typography>
117
- </CircularProgress>
118
- ```
119
-
120
- ```tsx
121
- <CircularProgress determinate value={66}>
122
- <Typography level="body-xs">66%</Typography>
123
- </CircularProgress>
124
- ```
125
-
126
- ## In Button
127
-
128
- Use CircularProgress inside a Button to indicate a loading state.
129
-
130
- ```tsx
131
- <>
132
- <Button startDecorator={<CircularProgress variant="solid" size="sm" />}>
133
- Loading…
134
- </Button>
135
- <Button disabled>
136
- <CircularProgress variant="soft" size="sm" />
137
- </Button>
138
- </>
139
- ```
140
-
141
- ```tsx
142
- <Button startDecorator={<CircularProgress variant="solid" size="sm" />}>
143
- Loading…
144
- </Button>
145
-
146
- <Button disabled>
147
- <CircularProgress variant="soft" size="sm" />
148
- </Button>
149
- ```
150
-
151
- ## Thickness
152
-
153
- Control the stroke thickness of the progress ring with the `thickness` prop.
154
-
155
- ```tsx
156
- <>
157
- <CircularProgress thickness={2} />
158
- <CircularProgress thickness={4} />
159
- <CircularProgress thickness={8} />
160
- </>
161
- ```
162
-
163
- ```tsx
164
- <CircularProgress thickness={2} />
165
- <CircularProgress thickness={4} />
166
- <CircularProgress thickness={8} />
167
- ```
168
-
169
- ## Common Use Cases
170
-
171
- ### Data Fetching Indicator
172
-
173
- ```tsx
174
- function DataLoader() {
175
- const [loading, setLoading] = React.useState(true);
176
- const [data, setData] = React.useState(null);
177
-
178
- React.useEffect(() => {
179
- fetchData().then((result) => {
180
- setData(result);
181
- setLoading(false);
182
- });
183
- }, []);
184
-
185
- if (loading) {
186
- return (
187
- <Box sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
188
- <CircularProgress />
189
- </Box>
190
- );
191
- }
192
-
193
- return <DataView data={data} />;
194
- }
195
- ```
196
-
197
- ### File Upload Progress
198
-
199
- ```tsx
200
- function FileUpload({ progress }: { progress: number }) {
201
- return (
202
- <Stack direction="row" alignItems="center" spacing={2}>
203
- <CircularProgress determinate value={progress} size="lg">
204
- <Typography level="body-xs">{progress}%</Typography>
205
- </CircularProgress>
206
- <Typography level="body-md">Uploading file…</Typography>
207
- </Stack>
208
- );
209
- }
210
- ```
211
-
212
- ### Inline Loading Button
213
-
214
- ```tsx
215
- function SubmitButton({ isSubmitting }: { isSubmitting: boolean }) {
216
- return (
217
- <Button
218
- disabled={isSubmitting}
219
- startDecorator={
220
- isSubmitting ? <CircularProgress variant="solid" size="sm" /> : null
221
- }
222
- >
223
- {isSubmitting ? 'Submitting…' : 'Submit'}
224
- </Button>
225
- );
226
- }
227
- ```
228
-
229
- ## Best Practices
230
-
231
- 1. **Use indeterminate for unknown durations**: When you cannot estimate progress, use the default spinning mode. Switch to determinate only when you can track actual progress.
232
-
233
- ```tsx
234
- // ✅ Unknown duration — indeterminate
235
- <CircularProgress />
236
-
237
- // ✅ Known progress — determinate
238
- <CircularProgress determinate value={uploadProgress} />
239
-
240
- // ❌ Don't use determinate with a static value for loading
241
- <CircularProgress determinate value={50} />
242
- ```
243
-
244
- 2. **Size appropriately**: Use `sm` for inline contexts (buttons, table cells), `md` for general use, and `lg` for prominent page-level loading states.
245
-
246
- 3. **Match variant with context**: Use `solid` variant inside solid buttons, and `soft` (default) for standalone usage to maintain visual consistency.
247
-
248
- 4. **Add descriptive text**: Always pair the indicator with text or an `aria-label` so users understand what is loading.
249
-
250
- 5. **Avoid multiple spinners**: Show one loading indicator per distinct loading region. Multiple spinners on a page create visual clutter.
251
-
252
- ## Accessibility
253
-
254
- - CircularProgress has `role="progressbar"` by default.
255
- - In determinate mode, `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` are set automatically.
256
- - Add `aria-label` or nearby descriptive text to explain what is loading (e.g., `aria-label="Loading user data"`).
257
- - Ensure sufficient color contrast between the progress ring and its background, especially with the `plain` variant.