lucent-ui 0.20.0 → 0.22.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.
@@ -10,26 +10,38 @@ export const COMPONENT_MANIFEST = {
10
10
  'Use `onDismiss` for removable chips (filters, multi-select values). ' +
11
11
  'Use `onClick` for clickable/selectable chips (filter toggles, category navigation). ' +
12
12
  'Use `dot` for status indicators (online/offline). ' +
13
+ 'Use `dot` + `pulse` to show in-progress or live states (deploying, syncing, live incident). ' +
14
+ 'Use `ghost` + `dot` for subtle inline status that blends into surrounding text or table rows. ' +
15
+ 'Omit `children` with `dot` for a minimal dot-only indicator — great for table cells or avatar badges. ' +
13
16
  'Use `swatch` for color-coded categories. ' +
14
17
  'Use `leftIcon` for chips with leading icons (folders, file types, flags). ' +
15
18
  'Use `borderless` for a softer, filled-only appearance in dense UIs. ' +
16
19
  'Variant conveys semantic meaning — default to neutral for user-generated content.',
17
20
  props: [
18
- { name: 'children', type: 'ReactNode', required: true, description: 'Chip label content.' },
21
+ { name: 'children', type: 'ReactNode', required: false, description: 'Chip label content. When omitted with dot=true, renders as a compact dot-only indicator.' },
19
22
  { name: 'variant', type: 'enum', required: false, default: 'neutral', description: 'Colour scheme conveying semantic meaning.', enumValues: ['neutral', 'accent', 'success', 'warning', 'danger', 'info'] },
20
23
  { name: 'size', type: 'enum', required: false, default: 'md', description: 'Controls height, font size, and icon size.', enumValues: ['sm', 'md', 'lg'] },
21
24
  { name: 'onDismiss', type: 'function', required: false, description: 'Renders an x button that calls this handler. Use for removable filters and multi-select values.' },
22
25
  { name: 'onClick', type: 'function', required: false, description: 'Makes the chip clickable (renders as <button>). Use for filter toggles and category links.' },
23
26
  { name: 'leftIcon', type: 'ReactNode', required: false, description: 'Icon or element rendered before the label (emoji, flag, avatar).' },
24
27
  { name: 'swatch', type: 'string', required: false, description: 'Hex color string. Renders a small color dot before the label.' },
25
- { name: 'dot', type: 'boolean', required: false, default: 'false', description: 'Renders a status dot using the variant colour. Use for online/offline indicators.' },
28
+ { name: 'dot', type: 'boolean', required: false, default: 'false', description: 'Renders a status dot using the variant colour. Omit children for a compact dot-only indicator.' },
29
+ { name: 'pulse', type: 'boolean', required: false, default: 'false', description: 'Adds a pulsing ring animation to the status dot. Only applies when dot=true. Use for running, deploying, or live states.' },
26
30
  { name: 'borderless', type: 'boolean', required: false, default: 'false', description: 'Removes the border for a filled-only look.' },
31
+ { name: 'ghost', type: 'boolean', required: false, default: 'false', description: 'Transparent background with text color only. Pairs well with dot for subtle inline statuses in tables or lists.' },
27
32
  { name: 'disabled', type: 'boolean', required: false, default: 'false', description: 'Dims the chip and prevents interaction.' },
28
33
  { name: 'style', type: 'object', required: false, description: 'Inline style overrides.' },
29
34
  ],
30
35
  usageExamples: [
36
+ // Status indicators — subtle ways to show state
37
+ { title: 'Status dot', code: `<Chip variant="success" dot>Online</Chip>` },
38
+ { title: 'Pulsing status (in-progress)', code: `<Chip variant="warning" dot pulse>Deploying</Chip>` },
39
+ { title: 'Ghost status (inline/table)', code: `<Chip variant="success" ghost dot>Active</Chip>` },
40
+ { title: 'Ghost pulsing', code: `<Chip variant="danger" ghost dot pulse>Live incident</Chip>` },
41
+ { title: 'Dot only (minimal)', code: `<Chip variant="success" dot />` },
42
+ { title: 'Dot only pulsing', code: `<Chip variant="danger" dot pulse />` },
43
+ // Filters, tags, and categories
31
44
  { title: 'Dismissible filter', code: `<Chip onDismiss={() => removeFilter('react')}>React</Chip>` },
32
- { title: 'Status with dot', code: `<Chip variant="success" dot>Online</Chip>` },
33
45
  { title: 'Color swatch', code: `<Chip swatch="#6366f1" onDismiss={() => {}}>Indigo</Chip>` },
34
46
  { title: 'With icon', code: `<Chip leftIcon={<FolderIcon />} onDismiss={() => {}}>Documents</Chip>` },
35
47
  { title: 'Clickable category', code: `<Chip variant="accent" onClick={() => navigate('/ux')}>UX</Chip>` },
@@ -0,0 +1,33 @@
1
+ export const COMPONENT_MANIFEST = {
2
+ id: 'progress',
3
+ name: 'Progress',
4
+ tier: 'atom',
5
+ domain: 'neutral',
6
+ specVersion: '0.1',
7
+ description: 'A horizontal bar indicating completion, progress, or resource usage.',
8
+ designIntent: 'Use Progress to visualise a bounded numeric value — task completion, disk usage, health bars, etc. ' +
9
+ 'Set warnAt/dangerAt thresholds for automatic colour shifts instead of hardcoding variants. ' +
10
+ 'Ascending thresholds (warnAt < dangerAt) suit "high is bad" metrics like CPU; ' +
11
+ 'descending thresholds (warnAt > dangerAt) suit "low is bad" metrics like battery.',
12
+ props: [
13
+ { name: 'value', type: 'number', required: true, description: 'Current progress value.' },
14
+ { name: 'max', type: 'number', required: false, default: '100', description: 'Maximum value.' },
15
+ { name: 'variant', type: 'enum', required: false, default: 'accent', description: 'Colour variant. Overridden when thresholds are set.', enumValues: ['accent', 'success', 'warning', 'danger'] },
16
+ { name: 'size', type: 'enum', required: false, default: 'md', description: 'Bar height.', enumValues: ['sm', 'md', 'lg'] },
17
+ { name: 'warnAt', type: 'number', required: false, description: 'Value at which variant auto-switches to warning.' },
18
+ { name: 'dangerAt', type: 'number', required: false, description: 'Value at which variant auto-switches to danger.' },
19
+ { name: 'label', type: 'union', required: false, description: 'true shows percentage; ReactNode shows custom label.' },
20
+ ],
21
+ usageExamples: [
22
+ { title: 'Basic', code: `<Progress value={60} />` },
23
+ { title: 'With label', code: `<Progress value={42} label />` },
24
+ { title: 'Thresholds', code: `<Progress value={85} warnAt={70} dangerAt={90} label />` },
25
+ { title: 'Danger variant', code: `<Progress value={95} variant="danger" size="lg" label />` },
26
+ ],
27
+ compositionGraph: [],
28
+ accessibility: {
29
+ role: 'progressbar',
30
+ ariaAttributes: ['aria-valuenow', 'aria-valuemin', 'aria-valuemax'],
31
+ notes: 'Uses native progressbar role. Add aria-label on the wrapping element for screen-reader context.',
32
+ },
33
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucent-ui",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "description": "An AI-first React component library with machine-readable manifests.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",