@tc96/cli 0.27.0 → 0.28.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/README.md +4 -4
- package/cli.js +82 -27
- package/package.json +1 -1
- package/registry/agenda-1.json +1297 -0
- package/registry/aggregate.json +1 -1
- package/registry/ai-chat-1.json +91 -0
- package/registry/checklist.json +21 -7
- package/registry/collection.json +624 -351
- package/registry/crm-1.json +1317 -0
- package/registry/crm-2.json +1400 -0
- package/registry/dashboard-5.json +167 -0
- package/registry/dashboard-6.json +143 -0
- package/registry/dashboard-7.json +188 -0
- package/registry/documents-1.json +1322 -0
- package/registry/finance-1.json +845 -0
- package/registry/finance-2.json +973 -0
- package/registry/finance-3.json +1436 -0
- package/registry/{workflow-editor.json → flow-1.json} +37 -37
- package/registry/{agent-builder.json → flow-2.json} +55 -55
- package/registry/{run-monitor.json → flow-3.json} +16 -16
- package/registry/{impact-map.json → flow-4.json} +16 -16
- package/registry/inbox-1.json +1184 -0
- package/registry/inventory-1.json +828 -0
- package/registry/inventory-2.json +956 -0
- package/registry/legal-1.json +1345 -0
- package/registry/legal-2.json +1279 -0
- package/registry/legal-3.json +1273 -0
- package/registry/legal-4.json +1273 -0
- package/registry/legal-5.json +1393 -0
- package/registry/legal-6.json +1309 -0
- package/registry/legal-7.json +1315 -0
- package/registry/legal-8.json +1358 -0
- package/registry/legal-9.json +1381 -0
- package/registry/marketing-1.json +833 -0
- package/registry/marketing-2.json +961 -0
- package/registry/navbar-1.json +6 -6
- package/registry/navbar-10.json +50 -0
- package/registry/navbar-11.json +48 -0
- package/registry/navbar-12.json +48 -0
- package/registry/navbar-6.json +48 -0
- package/registry/navbar-7.json +72 -0
- package/registry/navbar-8.json +50 -0
- package/registry/navbar-9.json +54 -0
- package/registry/projects-1.json +865 -0
- package/registry/projects-2.json +993 -0
- package/registry/projects-3.json +1346 -0
- package/registry/properties.json +65 -58
- package/registry/record-group.json +5 -1
- package/registry/revenue-1.json +834 -0
- package/registry/revenue-2.json +968 -0
- package/registry/revenue-3.json +821 -0
- package/registry/revenue-4.json +949 -0
- package/registry/rich-text-editor-1.json +172 -0
- package/registry/rich-text-editor-2.json +158 -0
- package/registry/rich-text-editor-3.json +198 -0
- package/registry/rich-text-editor-4.json +200 -0
- package/registry/rich-text-editor-5.json +237 -0
- package/registry/rich-text-editor.json +27 -7
- package/registry/{settings-1.json → settings-account-1.json} +17 -17
- package/registry/{settings-23.json → settings-account-2.json} +17 -17
- package/registry/{settings-7.json → settings-catalog-1.json} +17 -17
- package/registry/{settings-16.json → settings-catalog-10.json} +17 -17
- package/registry/{settings-8.json → settings-catalog-2.json} +17 -17
- package/registry/{settings-9.json → settings-catalog-3.json} +17 -17
- package/registry/{settings-10.json → settings-catalog-4.json} +29 -20
- package/registry/{settings-11.json → settings-catalog-5.json} +17 -17
- package/registry/{settings-12.json → settings-catalog-6.json} +17 -17
- package/registry/{settings-13.json → settings-catalog-7.json} +17 -17
- package/registry/{settings-14.json → settings-catalog-8.json} +29 -19
- package/registry/{settings-15.json → settings-catalog-9.json} +28 -18
- package/registry/{settings-19.json → settings-integration-1.json} +17 -17
- package/registry/settings-integration-2.json +122 -0
- package/registry/{settings-22.json → settings-integration-3.json} +17 -17
- package/registry/settings-integration-4.json +129 -0
- package/registry/settings-integration-5.json +122 -0
- package/registry/settings-integration-6.json +92 -0
- package/registry/{settings-21.json → settings-integration-7.json} +23 -17
- package/registry/settings-integration-8.json +593 -0
- package/registry/{settings-20.json → settings-notification-channel-1.json} +17 -17
- package/registry/{settings-2.json → settings-preference-1.json} +17 -17
- package/registry/{settings-3.json → settings-preference-2.json} +17 -17
- package/registry/{settings-4.json → settings-preference-3.json} +17 -17
- package/registry/{settings-18.json → settings-role-permission-1.json} +17 -17
- package/registry/{settings-17.json → settings-security-1.json} +17 -17
- package/registry/{settings-5.json → settings-workspace-1.json} +28 -28
- package/registry/{settings-6.json → settings-workspace-2.json} +31 -31
- package/registry/support-1.json +853 -0
- package/registry/support-2.json +981 -0
- package/registry/support-3.json +762 -0
- package/registry/support-4.json +538 -0
- package/registry/team-1.json +829 -0
- package/registry/team-2.json +957 -0
- package/registry/ui/gauge.json +1 -1
- package/registry/ui/menu.json +1 -1
- package/registry/ui/property-meta.json +16 -0
- package/registry/ui/property-tone.json +12 -0
- package/registry/ui/scroll-area.json +1 -1
- package/registry/ui/select.json +1 -1
- package/registry/view.json +624 -351
- package/registry/app-shell-5.json +0 -106
- package/registry/bulk-import-1.json +0 -151
- package/registry/collection-layouts.json +0 -836
- package/registry/collection-views.json +0 -836
- package/registry/detail-sheet.json +0 -54
- package/registry/icon-row.json +0 -52
- package/registry/lookup-create-1.json +0 -157
- package/registry/next-steps-1.json +0 -147
- package/registry/settings-shell.json +0 -60
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "settings-
|
|
2
|
+
"name": "settings-notification-channel-1",
|
|
3
3
|
"type": "registry:block",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "blocks/application/settings/settings-
|
|
6
|
+
"path": "blocks/application/settings/notification-channel/settings-notification-channel-1/index.ts",
|
|
7
7
|
"type": "registry:file",
|
|
8
|
-
"content": "export {
|
|
9
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
8
|
+
"content": "export { SettingsNotificationChannel1 } from './settings-notification-channel-1'\nexport type {\n SettingsNotificationChannel1Category,\n SettingsNotificationChannel1Channel,\n SettingsNotificationChannel1Event,\n SettingsNotificationChannel1Labels,\n SettingsNotificationChannel1Matrix,\n SettingsNotificationChannel1Props,\n} from './types'\n",
|
|
9
|
+
"target": "~/packages/ui/src/blocks/application/settings/notification-channel/settings-notification-channel-1/index.ts"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"path": "blocks/application/settings/settings-
|
|
12
|
+
"path": "blocks/application/settings/notification-channel/settings-notification-channel-1/labels.ts",
|
|
13
13
|
"type": "registry:file",
|
|
14
|
-
"content": "import { defaultSettingsLoadLabels } from '
|
|
15
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
14
|
+
"content": "import { defaultSettingsLoadLabels } from '../../shared/labels'\nimport type { SettingsNotificationChannel1Labels } from './types'\n\nexport const defaultSettingsNotificationChannel1Labels: SettingsNotificationChannel1Labels =\n {\n ...defaultSettingsLoadLabels,\n errorTitle: 'Não foi possível carregar as notificações',\n loading: 'Carregando notificações',\n categories: 'Categorias de notificação',\n cell: (event, channel) => `${event} por ${channel}`,\n description: 'Escolha por onde receber o aviso de cada evento.',\n emptyDescription:\n 'Os eventos de notificação aparecem aqui quando existirem.',\n emptyTitle: 'Nenhum evento de notificação',\n event: 'Evento',\n title: 'Canais de notificação',\n }\n",
|
|
15
|
+
"target": "~/packages/ui/src/blocks/application/settings/notification-channel/settings-notification-channel-1/labels.ts"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "blocks/application/settings/settings-
|
|
18
|
+
"path": "blocks/application/settings/notification-channel/settings-notification-channel-1/settings-notification-channel-1-skeleton.tsx",
|
|
19
19
|
"type": "registry:file",
|
|
20
|
-
"content": "import { Skeleton } from '@tc96/ui/skeleton'\nimport { SettingsTableSkeleton } from '
|
|
21
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
20
|
+
"content": "import { Skeleton } from '@tc96/ui/skeleton'\nimport { SettingsTableSkeleton } from '../../shared/settings-skeleton'\n\nexport function SettingsNotificationChannel1Skeleton() {\n return (\n <>\n <div className=\"flex gap-4 py-3\">\n <Skeleton className=\"h-8 w-24\" />\n <Skeleton className=\"h-8 w-24\" />\n <Skeleton className=\"h-8 w-24\" />\n </div>\n <SettingsTableSkeleton columns={4} rows={5} />\n </>\n )\n}\n",
|
|
21
|
+
"target": "~/packages/ui/src/blocks/application/settings/notification-channel/settings-notification-channel-1/settings-notification-channel-1-skeleton.tsx"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "blocks/application/settings/settings-
|
|
24
|
+
"path": "blocks/application/settings/notification-channel/settings-notification-channel-1/settings-notification-channel-1.tsx",
|
|
25
25
|
"type": "registry:file",
|
|
26
|
-
"content": "import { Checkbox } from '@tc96/ui/checkbox'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { StateSurface } from '@tc96/ui/patterns/surfaces/state/composition/state-surface/state-surface'\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@tc96/ui/table'\nimport { Tabs, TabsList, TabsPanel, TabsTab } from '@tc96/ui/tabs'\nimport { Text } from '@tc96/ui/text'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '
|
|
27
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
26
|
+
"content": "import { Checkbox } from '@tc96/ui/checkbox'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { StateSurface } from '@tc96/ui/patterns/surfaces/state/composition/state-surface/state-surface'\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@tc96/ui/table'\nimport { Tabs, TabsList, TabsPanel, TabsTab } from '@tc96/ui/tabs'\nimport { Text } from '@tc96/ui/text'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '../../shared/settings-load-state'\nimport { defaultSettingsNotificationChannel1Labels } from './labels'\nimport { SettingsNotificationChannel1Skeleton } from './settings-notification-channel-1-skeleton'\nimport type { SettingsNotificationChannel1Props } from './types'\n\nexport function SettingsNotificationChannel1({\n error,\n onRetry,\n pending,\n categories,\n channels,\n className,\n labels: labelsProp,\n matrix,\n onChange,\n}: Readonly<SettingsNotificationChannel1Props>) {\n const labels = { ...defaultSettingsNotificationChannel1Labels, ...labelsProp }\n const loadState = settingsLoadState({\n error,\n labels,\n onRetry,\n pending,\n skeleton: <SettingsNotificationChannel1Skeleton />,\n })\n\n return (\n <SettingsSection\n className={cn('mx-auto w-full max-w-3xl', className)}\n header={\n <SettingsSectionHeader>\n <SettingsSectionTitle>{labels.title}</SettingsSectionTitle>\n <SettingsSectionDescription>\n {labels.description}\n </SettingsSectionDescription>\n </SettingsSectionHeader>\n }\n >\n {loadState ??\n (categories.length === 0 ? (\n <StateSurface\n description={labels.emptyDescription}\n kind=\"empty\"\n title={labels.emptyTitle}\n />\n ) : (\n <Tabs defaultValue={categories[0]?.id}>\n <TabsList aria-label={labels.categories} variant=\"underline\">\n {categories.map((category) => (\n <TabsTab key={category.id} value={category.id}>\n {category.name}\n </TabsTab>\n ))}\n </TabsList>\n {categories.map((category) => (\n <TabsPanel key={category.id} value={category.id}>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>{labels.event}</TableHead>\n {channels.map((channel) => (\n <TableHead className=\"text-center\" key={channel.id}>\n {channel.name}\n </TableHead>\n ))}\n </TableRow>\n </TableHeader>\n <TableBody>\n {category.events.map((event) => (\n <TableRow key={event.id}>\n <TableCell>\n <Text\n render={<p>{event.name}</p>}\n size=\"sm\"\n weight=\"semibold\"\n />\n {event.description ? (\n <Text\n foreground=\"muted\"\n render={<p>{event.description}</p>}\n size=\"sm\"\n />\n ) : null}\n </TableCell>\n {channels.map((channel) => (\n <TableCell className=\"text-center\" key={channel.id}>\n <Checkbox\n aria-label={labels.cell(event.name, channel.name)}\n checked={matrix[event.id]?.[channel.id] ?? false}\n disabled={!onChange}\n onCheckedChange={(checked) =>\n onChange?.(event.id, channel.id, checked)\n }\n />\n </TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TabsPanel>\n ))}\n </Tabs>\n ))}\n </SettingsSection>\n )\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/blocks/application/settings/notification-channel/settings-notification-channel-1/settings-notification-channel-1.tsx"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "blocks/application/settings/settings-
|
|
30
|
+
"path": "blocks/application/settings/notification-channel/settings-notification-channel-1/types.ts",
|
|
31
31
|
"type": "registry:file",
|
|
32
|
-
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '
|
|
33
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
32
|
+
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '../../shared/types'\nexport interface SettingsNotificationChannel1Channel {\n id: string\n name: string\n}\n\nexport interface SettingsNotificationChannel1Event {\n description?: string\n id: string\n name: string\n}\n\nexport interface SettingsNotificationChannel1Category {\n events: SettingsNotificationChannel1Event[]\n id: string\n name: string\n}\n\nexport type SettingsNotificationChannel1Matrix = Record<\n string,\n Record<string, boolean>\n>\n\nexport interface SettingsNotificationChannel1Labels extends SettingsLoadLabels {\n categories: string\n cell: (event: string, channel: string) => string\n description: string\n emptyDescription: string\n emptyTitle: string\n event: string\n title: string\n}\n\nexport interface SettingsNotificationChannel1Props extends SettingsLoadProps {\n categories: SettingsNotificationChannel1Category[]\n channels: SettingsNotificationChannel1Channel[]\n className?: string\n labels?: Partial<SettingsNotificationChannel1Labels>\n matrix: SettingsNotificationChannel1Matrix\n onChange?: (eventId: string, channelId: string, checked: boolean) => void\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/blocks/application/settings/notification-channel/settings-notification-channel-1/types.ts"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "blocks/application/settings/shared/labels.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
{
|
|
54
54
|
"path": "blocks/application/settings/shared/types.ts",
|
|
55
55
|
"type": "registry:file",
|
|
56
|
-
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n",
|
|
56
|
+
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n\nexport interface SettingsAppLogoData {\n svg: string\n title?: string\n}\n",
|
|
57
57
|
"target": "~/packages/ui/src/blocks/application/settings/shared/types.ts"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "settings-
|
|
2
|
+
"name": "settings-preference-1",
|
|
3
3
|
"type": "registry:block",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "blocks/application/settings/settings-
|
|
6
|
+
"path": "blocks/application/settings/preference/settings-preference-1/index.ts",
|
|
7
7
|
"type": "registry:file",
|
|
8
|
-
"content": "export {
|
|
9
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
8
|
+
"content": "export { SettingsPreference1 } from './settings-preference-1'\nexport type {\n SettingsPreference1Labels,\n SettingsPreference1Options,\n SettingsPreference1Props,\n SettingsPreference1SettingOption,\n SettingsPreference1Values,\n} from './types'\n",
|
|
9
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-1/index.ts"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"path": "blocks/application/settings/settings-
|
|
12
|
+
"path": "blocks/application/settings/preference/settings-preference-1/labels.ts",
|
|
13
13
|
"type": "registry:file",
|
|
14
|
-
"content": "import { defaultSettingsLoadLabels } from '
|
|
15
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
14
|
+
"content": "import { defaultSettingsLoadLabels } from '../../shared/labels'\nimport type { SettingsPreference1Labels } from './types'\n\nexport const defaultSettingsPreference1Labels: SettingsPreference1Labels = {\n ...defaultSettingsLoadLabels,\n errorTitle: 'Não foi possível carregar as preferências',\n loading: 'Carregando preferências',\n displayNames: 'Nomes de exibição',\n displayNamesDescription: 'Como os nomes das pessoas aparecem na interface',\n fontSize: 'Tamanho da fonte',\n fontSizeDescription: 'Ajusta o tamanho do texto em todo o app',\n generalTitle: 'Geral',\n interfaceTitle: 'Interface e tema',\n theme: 'Tema da interface',\n themeDescription: 'Escolha o esquema de cores da interface',\n underlineLinks: 'Sublinhar links',\n underlineLinksDescription: 'Sempre sublinha os títulos das listas',\n}\n",
|
|
15
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-1/labels.ts"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "blocks/application/settings/settings-
|
|
18
|
+
"path": "blocks/application/settings/preference/settings-preference-1/settings-preference-1-skeleton.tsx",
|
|
19
19
|
"type": "registry:file",
|
|
20
|
-
"content": "import { SettingsRowsSkeleton } from '
|
|
21
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
20
|
+
"content": "import { SettingsRowsSkeleton } from '../../shared/settings-skeleton'\n\nexport function SettingsPreference1Skeleton() {\n return <SettingsRowsSkeleton count={1} end=\"switch\" />\n}\n",
|
|
21
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-1/settings-preference-1-skeleton.tsx"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "blocks/application/settings/settings-
|
|
24
|
+
"path": "blocks/application/settings/preference/settings-preference-1/settings-preference-1.tsx",
|
|
25
25
|
"type": "registry:file",
|
|
26
|
-
"content": "import { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { Switch } from '@tc96/ui/switch'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '
|
|
27
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
26
|
+
"content": "import { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { Switch } from '@tc96/ui/switch'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '../../shared/settings-load-state'\nimport { SettingsSelect } from '../../shared/settings-select'\nimport { defaultSettingsPreference1Labels } from './labels'\nimport { SettingsPreference1Skeleton } from './settings-preference-1-skeleton'\nimport type { SettingsPreference1Props } from './types'\n\nexport function SettingsPreference1({\n error,\n onRetry,\n pending,\n className,\n labels: labelsProp,\n onValueChange,\n options,\n values,\n}: Readonly<SettingsPreference1Props>) {\n const labels = { ...defaultSettingsPreference1Labels, ...labelsProp }\n const loadState = settingsLoadState({\n error,\n labels,\n onRetry,\n pending,\n skeleton: <SettingsPreference1Skeleton />,\n })\n\n return (\n <div\n className={cn('mx-auto flex w-full max-w-2xl flex-col gap-8', className)}\n >\n <SettingsSection\n header={\n <SettingsSectionHeader>\n <SettingsSectionTitle>{labels.generalTitle}</SettingsSectionTitle>\n </SettingsSectionHeader>\n }\n >\n {loadState ?? (\n <SettingsRow\n description={labels.displayNamesDescription}\n endSlot={\n <SettingsSelect\n ariaLabel={labels.displayNames}\n items={options.displayNames}\n onValueChange={(next) => onValueChange?.('displayNames', next)}\n value={values.displayNames}\n />\n }\n title={labels.displayNames}\n />\n )}\n </SettingsSection>\n {loadState ? null : (\n <SettingsSection\n header={\n <SettingsSectionHeader>\n <SettingsSectionTitle>\n {labels.interfaceTitle}\n </SettingsSectionTitle>\n </SettingsSectionHeader>\n }\n >\n <SettingsRow\n description={labels.fontSizeDescription}\n endSlot={\n <SettingsSelect\n ariaLabel={labels.fontSize}\n items={options.fontSize}\n onValueChange={(next) => onValueChange?.('fontSize', next)}\n value={values.fontSize}\n />\n }\n title={labels.fontSize}\n />\n <SettingsRow\n description={labels.underlineLinksDescription}\n endSlot={\n <Switch\n aria-label={labels.underlineLinks}\n checked={values.underlineLinks}\n onCheckedChange={(next) =>\n onValueChange?.('underlineLinks', next)\n }\n />\n }\n title={labels.underlineLinks}\n />\n <SettingsRow\n description={labels.themeDescription}\n endSlot={\n <SettingsSelect\n ariaLabel={labels.theme}\n items={options.theme}\n onValueChange={(next) => onValueChange?.('theme', next)}\n value={values.theme}\n />\n }\n title={labels.theme}\n />\n </SettingsSection>\n )}\n </div>\n )\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-1/settings-preference-1.tsx"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "blocks/application/settings/settings-
|
|
30
|
+
"path": "blocks/application/settings/preference/settings-preference-1/types.ts",
|
|
31
31
|
"type": "registry:file",
|
|
32
|
-
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '
|
|
33
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
32
|
+
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '../../shared/types'\nexport interface SettingsPreference1SettingOption {\n label: string\n value: string\n}\n\nexport interface SettingsPreference1Values {\n displayNames: string\n fontSize: string\n theme: string\n underlineLinks: boolean\n}\n\nexport interface SettingsPreference1Options {\n displayNames: SettingsPreference1SettingOption[]\n fontSize: SettingsPreference1SettingOption[]\n theme: SettingsPreference1SettingOption[]\n}\n\nexport interface SettingsPreference1Labels extends SettingsLoadLabels {\n displayNames: string\n displayNamesDescription: string\n fontSize: string\n fontSizeDescription: string\n generalTitle: string\n interfaceTitle: string\n theme: string\n themeDescription: string\n underlineLinks: string\n underlineLinksDescription: string\n}\n\nexport interface SettingsPreference1Props extends SettingsLoadProps {\n className?: string\n labels?: Partial<SettingsPreference1Labels>\n onValueChange?: <K extends keyof SettingsPreference1Values>(\n key: K,\n value: SettingsPreference1Values[K],\n ) => void\n options: SettingsPreference1Options\n values: SettingsPreference1Values\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-1/types.ts"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "blocks/application/settings/shared/labels.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{
|
|
60
60
|
"path": "blocks/application/settings/shared/types.ts",
|
|
61
61
|
"type": "registry:file",
|
|
62
|
-
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n",
|
|
62
|
+
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n\nexport interface SettingsAppLogoData {\n svg: string\n title?: string\n}\n",
|
|
63
63
|
"target": "~/packages/ui/src/blocks/application/settings/shared/types.ts"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "settings-
|
|
2
|
+
"name": "settings-preference-2",
|
|
3
3
|
"type": "registry:block",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "blocks/application/settings/settings-
|
|
6
|
+
"path": "blocks/application/settings/preference/settings-preference-2/index.ts",
|
|
7
7
|
"type": "registry:file",
|
|
8
|
-
"content": "export {
|
|
9
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
8
|
+
"content": "export { SettingsPreference2 } from './settings-preference-2'\nexport type {\n SettingsPreference2Labels,\n SettingsPreference2Options,\n SettingsPreference2Props,\n SettingsPreference2SettingOption,\n SettingsPreference2Values,\n} from './types'\n",
|
|
9
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-2/index.ts"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"path": "blocks/application/settings/settings-
|
|
12
|
+
"path": "blocks/application/settings/preference/settings-preference-2/labels.ts",
|
|
13
13
|
"type": "registry:file",
|
|
14
|
-
"content": "import { defaultSettingsLoadLabels } from '
|
|
15
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
14
|
+
"content": "import { defaultSettingsLoadLabels } from '../../shared/labels'\nimport type { SettingsPreference2Labels } from './types'\n\nexport const defaultSettingsPreference2Labels: SettingsPreference2Labels = {\n ...defaultSettingsLoadLabels,\n errorTitle: 'Não foi possível carregar as configurações',\n loading: 'Carregando configurações',\n emailNotifications: 'Notificações por e-mail',\n emailNotificationsDescription: 'Envia um resumo da atividade do dia',\n fontSize: 'Tamanho da fonte',\n fontSizeDescription: 'Ajusta o tamanho do texto em todo o app',\n language: 'Idioma',\n languageDescription: 'O idioma dos menus e das mensagens',\n title: 'Interface e tema',\n}\n",
|
|
15
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-2/labels.ts"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "blocks/application/settings/settings-
|
|
18
|
+
"path": "blocks/application/settings/preference/settings-preference-2/settings-preference-2-skeleton.tsx",
|
|
19
19
|
"type": "registry:file",
|
|
20
|
-
"content": "import { SettingsRowsSkeleton } from '
|
|
21
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
20
|
+
"content": "import { SettingsRowsSkeleton } from '../../shared/settings-skeleton'\n\nexport function SettingsPreference2Skeleton() {\n return <SettingsRowsSkeleton count={3} start=\"icon\" end=\"select\" />\n}\n",
|
|
21
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-2/settings-preference-2-skeleton.tsx"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "blocks/application/settings/settings-
|
|
24
|
+
"path": "blocks/application/settings/preference/settings-preference-2/settings-preference-2.tsx",
|
|
25
25
|
"type": "registry:file",
|
|
26
|
-
"content": "import { BellIcon, TextTIcon, TranslateIcon } from '@phosphor-icons/react'\nimport { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { Switch } from '@tc96/ui/switch'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '
|
|
27
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
26
|
+
"content": "import { BellIcon, TextTIcon, TranslateIcon } from '@phosphor-icons/react'\nimport { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { Switch } from '@tc96/ui/switch'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '../../shared/settings-load-state'\nimport { SettingsSelect } from '../../shared/settings-select'\nimport { defaultSettingsPreference2Labels } from './labels'\nimport { SettingsPreference2Skeleton } from './settings-preference-2-skeleton'\nimport type { SettingsPreference2Props } from './types'\n\nexport function SettingsPreference2({\n error,\n onRetry,\n pending,\n className,\n labels: labelsProp,\n onValueChange,\n options,\n values,\n}: Readonly<SettingsPreference2Props>) {\n const labels = { ...defaultSettingsPreference2Labels, ...labelsProp }\n const loadState = settingsLoadState({\n error,\n labels,\n onRetry,\n pending,\n skeleton: <SettingsPreference2Skeleton />,\n })\n\n return (\n <SettingsSection\n className={cn('mx-auto w-full max-w-2xl', className)}\n header={\n <SettingsSectionHeader>\n <SettingsSectionTitle>{labels.title}</SettingsSectionTitle>\n </SettingsSectionHeader>\n }\n >\n {loadState ?? (\n <>\n <SettingsRow\n description={labels.fontSizeDescription}\n endSlot={\n <SettingsSelect\n ariaLabel={labels.fontSize}\n items={options.fontSize}\n onValueChange={(next) => onValueChange?.('fontSize', next)}\n value={values.fontSize}\n />\n }\n startSlot={<TextTIcon aria-hidden=\"true\" />}\n title={labels.fontSize}\n />\n <SettingsRow\n description={labels.languageDescription}\n endSlot={\n <SettingsSelect\n ariaLabel={labels.language}\n items={options.language}\n onValueChange={(next) => onValueChange?.('language', next)}\n value={values.language}\n />\n }\n startSlot={<TranslateIcon aria-hidden=\"true\" />}\n title={labels.language}\n />\n <SettingsRow\n description={labels.emailNotificationsDescription}\n endSlot={\n <Switch\n aria-label={labels.emailNotifications}\n checked={values.emailNotifications}\n onCheckedChange={(next) =>\n onValueChange?.('emailNotifications', next)\n }\n />\n }\n startSlot={<BellIcon aria-hidden=\"true\" />}\n title={labels.emailNotifications}\n />\n </>\n )}\n </SettingsSection>\n )\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-2/settings-preference-2.tsx"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "blocks/application/settings/settings-
|
|
30
|
+
"path": "blocks/application/settings/preference/settings-preference-2/types.ts",
|
|
31
31
|
"type": "registry:file",
|
|
32
|
-
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '
|
|
33
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
32
|
+
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '../../shared/types'\nexport interface SettingsPreference2SettingOption {\n label: string\n value: string\n}\n\nexport interface SettingsPreference2Values {\n emailNotifications: boolean\n fontSize: string\n language: string\n}\n\nexport interface SettingsPreference2Options {\n fontSize: SettingsPreference2SettingOption[]\n language: SettingsPreference2SettingOption[]\n}\n\nexport interface SettingsPreference2Labels extends SettingsLoadLabels {\n emailNotifications: string\n emailNotificationsDescription: string\n fontSize: string\n fontSizeDescription: string\n language: string\n languageDescription: string\n title: string\n}\n\nexport interface SettingsPreference2Props extends SettingsLoadProps {\n className?: string\n labels?: Partial<SettingsPreference2Labels>\n onValueChange?: <K extends keyof SettingsPreference2Values>(\n key: K,\n value: SettingsPreference2Values[K],\n ) => void\n options: SettingsPreference2Options\n values: SettingsPreference2Values\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-2/types.ts"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "blocks/application/settings/shared/labels.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{
|
|
60
60
|
"path": "blocks/application/settings/shared/types.ts",
|
|
61
61
|
"type": "registry:file",
|
|
62
|
-
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n",
|
|
62
|
+
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n\nexport interface SettingsAppLogoData {\n svg: string\n title?: string\n}\n",
|
|
63
63
|
"target": "~/packages/ui/src/blocks/application/settings/shared/types.ts"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "settings-
|
|
2
|
+
"name": "settings-preference-3",
|
|
3
3
|
"type": "registry:block",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "blocks/application/settings/settings-
|
|
6
|
+
"path": "blocks/application/settings/preference/settings-preference-3/index.ts",
|
|
7
7
|
"type": "registry:file",
|
|
8
|
-
"content": "export {
|
|
9
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
8
|
+
"content": "export { SettingsPreference3 } from './settings-preference-3'\nexport type {\n SettingsPreference3Labels,\n SettingsPreference3Option,\n SettingsPreference3Props,\n SettingsPreference3ThemeGroup,\n} from './types'\n",
|
|
9
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-3/index.ts"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"path": "blocks/application/settings/settings-
|
|
12
|
+
"path": "blocks/application/settings/preference/settings-preference-3/labels.ts",
|
|
13
13
|
"type": "registry:file",
|
|
14
|
-
"content": "import { defaultSettingsLoadLabels } from '
|
|
15
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
14
|
+
"content": "import { defaultSettingsLoadLabels } from '../../shared/labels'\nimport type { SettingsPreference3Labels } from './types'\n\nexport const defaultSettingsPreference3Labels: SettingsPreference3Labels = {\n ...defaultSettingsLoadLabels,\n errorTitle: 'Não foi possível carregar a aparência',\n loading: 'Carregando aparência',\n mode: 'Modo',\n modeDescription: 'Claro, escuro ou a configuração do seu sistema',\n theme: 'Tema',\n themeDescription: 'Cores, raio e fontes da interface',\n title: 'Aparência',\n}\n",
|
|
15
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-3/labels.ts"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "blocks/application/settings/settings-
|
|
18
|
+
"path": "blocks/application/settings/preference/settings-preference-3/settings-preference-3-skeleton.tsx",
|
|
19
19
|
"type": "registry:file",
|
|
20
|
-
"content": "import { SettingsRowsSkeleton } from '
|
|
21
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
20
|
+
"content": "import { SettingsRowsSkeleton } from '../../shared/settings-skeleton'\n\nexport function SettingsPreference3Skeleton() {\n return <SettingsRowsSkeleton count={2} start=\"icon\" end=\"select\" />\n}\n",
|
|
21
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-3/settings-preference-3-skeleton.tsx"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "blocks/application/settings/settings-
|
|
24
|
+
"path": "blocks/application/settings/preference/settings-preference-3/settings-preference-3.tsx",
|
|
25
25
|
"type": "registry:file",
|
|
26
|
-
"content": "import { CircleHalfIcon, PaletteIcon } from '@phosphor-icons/react'\nimport { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport {\n Select,\n SelectGroup,\n SelectGroupLabel,\n SelectItem,\n SelectPopup,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from '@tc96/ui/select'\nimport { cn } from '@tc96/utils'\nimport { Fragment } from 'react'\nimport { settingsLoadState } from '
|
|
27
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
26
|
+
"content": "import { CircleHalfIcon, PaletteIcon } from '@phosphor-icons/react'\nimport { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport {\n Select,\n SelectGroup,\n SelectGroupLabel,\n SelectItem,\n SelectPopup,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from '@tc96/ui/select'\nimport { cn } from '@tc96/utils'\nimport { Fragment } from 'react'\nimport { settingsLoadState } from '../../shared/settings-load-state'\nimport { defaultSettingsPreference3Labels } from './labels'\nimport { SettingsPreference3Skeleton } from './settings-preference-3-skeleton'\nimport type {\n SettingsPreference3Option,\n SettingsPreference3Props,\n} from './types'\n\nfunction ThemeSwatch({ preset }: Readonly<{ preset: string }>) {\n return (\n <span\n aria-hidden=\"true\"\n className=\"flex h-4 w-7 shrink-0 overflow-hidden rounded-full border border-foreground/16 bg-background\"\n data-slot=\"theme-swatch\"\n data-theme-preset={preset}\n >\n <span className=\"flex-1\" />\n <span className=\"flex-1 bg-accent\" />\n <span className=\"flex-1 bg-primary\" data-slot=\"theme-swatch-primary\" />\n </span>\n )\n}\n\nfunction ThemeOption({\n option,\n}: Readonly<{ option: SettingsPreference3Option }>) {\n return (\n <SelectItem value={option.value}>\n <span className=\"flex items-center gap-2\">\n <ThemeSwatch preset={option.value} />\n {option.label}\n </span>\n </SelectItem>\n )\n}\n\nexport function SettingsPreference3({\n error,\n onRetry,\n pending,\n className,\n colorTheme,\n labels: labelsProp,\n mode,\n modeOptions,\n onColorThemeChange,\n onModeChange,\n themeGroups,\n}: Readonly<SettingsPreference3Props>) {\n const labels = { ...defaultSettingsPreference3Labels, ...labelsProp }\n const loadState = settingsLoadState({\n error,\n labels,\n onRetry,\n pending,\n skeleton: <SettingsPreference3Skeleton />,\n })\n const themeOptions = themeGroups.flatMap((group) => group.options)\n const titleOf = (value: string) =>\n themeOptions.find((option) => option.value === value)?.label ?? value\n\n return (\n <SettingsSection\n className={cn('mx-auto w-full max-w-2xl', className)}\n header={\n <SettingsSectionHeader>\n <SettingsSectionTitle>{labels.title}</SettingsSectionTitle>\n </SettingsSectionHeader>\n }\n >\n {loadState ?? (\n <>\n <SettingsRow\n description={labels.modeDescription}\n endSlot={\n <Select\n items={modeOptions}\n onValueChange={(next) => {\n if (next) onModeChange?.(next)\n }}\n value={mode}\n >\n <SelectTrigger aria-label={labels.mode} className=\"w-52\">\n <SelectValue />\n </SelectTrigger>\n <SelectPopup>\n {modeOptions.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectPopup>\n </Select>\n }\n startSlot={<CircleHalfIcon aria-hidden=\"true\" />}\n title={labels.mode}\n />\n <SettingsRow\n description={labels.themeDescription}\n endSlot={\n <Select\n items={themeOptions}\n onValueChange={(next) => {\n if (next) onColorThemeChange?.(next)\n }}\n value={colorTheme}\n >\n <SelectTrigger aria-label={labels.theme} className=\"w-52\">\n <SelectValue>\n {(current: string) => (\n <span className=\"flex min-w-0 items-center gap-2\">\n <ThemeSwatch preset={current} />\n <span className=\"truncate\">{titleOf(current)}</span>\n </span>\n )}\n </SelectValue>\n </SelectTrigger>\n <SelectPopup>\n {themeGroups.map((group, index) => (\n <Fragment key={group.id}>\n {index > 0 ? <SelectSeparator /> : null}\n {group.label ? (\n <SelectGroup>\n <SelectGroupLabel>{group.label}</SelectGroupLabel>\n {group.options.map((option) => (\n <ThemeOption key={option.value} option={option} />\n ))}\n </SelectGroup>\n ) : (\n group.options.map((option) => (\n <ThemeOption key={option.value} option={option} />\n ))\n )}\n </Fragment>\n ))}\n </SelectPopup>\n </Select>\n }\n startSlot={<PaletteIcon aria-hidden=\"true\" />}\n title={labels.theme}\n />\n </>\n )}\n </SettingsSection>\n )\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-3/settings-preference-3.tsx"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "blocks/application/settings/settings-
|
|
30
|
+
"path": "blocks/application/settings/preference/settings-preference-3/types.ts",
|
|
31
31
|
"type": "registry:file",
|
|
32
|
-
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '
|
|
33
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
32
|
+
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '../../shared/types'\nexport interface SettingsPreference3Option {\n label: string\n value: string\n}\n\nexport interface SettingsPreference3ThemeGroup {\n id: string\n label?: string\n options: SettingsPreference3Option[]\n}\n\nexport interface SettingsPreference3Labels extends SettingsLoadLabels {\n mode: string\n modeDescription: string\n theme: string\n themeDescription: string\n title: string\n}\n\nexport interface SettingsPreference3Props extends SettingsLoadProps {\n className?: string\n colorTheme: string\n labels?: Partial<SettingsPreference3Labels>\n mode: string\n modeOptions: SettingsPreference3Option[]\n onColorThemeChange?: (value: string) => void\n onModeChange?: (value: string) => void\n themeGroups: SettingsPreference3ThemeGroup[]\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/blocks/application/settings/preference/settings-preference-3/types.ts"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "blocks/application/settings/shared/labels.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
{
|
|
54
54
|
"path": "blocks/application/settings/shared/types.ts",
|
|
55
55
|
"type": "registry:file",
|
|
56
|
-
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n",
|
|
56
|
+
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n\nexport interface SettingsAppLogoData {\n svg: string\n title?: string\n}\n",
|
|
57
57
|
"target": "~/packages/ui/src/blocks/application/settings/shared/types.ts"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "settings-
|
|
2
|
+
"name": "settings-role-permission-1",
|
|
3
3
|
"type": "registry:block",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "blocks/application/settings/settings-
|
|
6
|
+
"path": "blocks/application/settings/role-permission/settings-role-permission-1/index.ts",
|
|
7
7
|
"type": "registry:file",
|
|
8
|
-
"content": "export {
|
|
9
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
8
|
+
"content": "export { SettingsRolePermission1 } from './settings-role-permission-1'\nexport type {\n SettingsRolePermission1Capability,\n SettingsRolePermission1Labels,\n SettingsRolePermission1Props,\n SettingsRolePermission1Role,\n} from './types'\n",
|
|
9
|
+
"target": "~/packages/ui/src/blocks/application/settings/role-permission/settings-role-permission-1/index.ts"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"path": "blocks/application/settings/settings-
|
|
12
|
+
"path": "blocks/application/settings/role-permission/settings-role-permission-1/labels.ts",
|
|
13
13
|
"type": "registry:file",
|
|
14
|
-
"content": "import { defaultSettingsLoadLabels } from '
|
|
15
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
14
|
+
"content": "import { defaultSettingsLoadLabels } from '../../shared/labels'\nimport type { SettingsRolePermission1Labels } from './types'\n\nexport const defaultSettingsRolePermission1Labels: SettingsRolePermission1Labels =\n {\n ...defaultSettingsLoadLabels,\n errorTitle: 'Não foi possível carregar as permissões',\n loading: 'Carregando permissões',\n description: 'Escolha o que cada função pode fazer no workspace.',\n emptyDescription: 'Esta função ainda não tem capacidades configuráveis.',\n emptyTitle: 'Nenhuma capacidade',\n role: 'Função',\n title: 'Permissões',\n }\n",
|
|
15
|
+
"target": "~/packages/ui/src/blocks/application/settings/role-permission/settings-role-permission-1/labels.ts"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "blocks/application/settings/settings-
|
|
18
|
+
"path": "blocks/application/settings/role-permission/settings-role-permission-1/settings-role-permission-1-skeleton.tsx",
|
|
19
19
|
"type": "registry:file",
|
|
20
|
-
"content": "import { SettingsRowsSkeleton } from '
|
|
21
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
20
|
+
"content": "import { SettingsRowsSkeleton } from '../../shared/settings-skeleton'\n\nexport function SettingsRolePermission1Skeleton() {\n return <SettingsRowsSkeleton count={6} end=\"switch\" />\n}\n",
|
|
21
|
+
"target": "~/packages/ui/src/blocks/application/settings/role-permission/settings-role-permission-1/settings-role-permission-1-skeleton.tsx"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "blocks/application/settings/settings-
|
|
24
|
+
"path": "blocks/application/settings/role-permission/settings-role-permission-1/settings-role-permission-1.tsx",
|
|
25
25
|
"type": "registry:file",
|
|
26
|
-
"content": "import { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { StateSurface } from '@tc96/ui/patterns/surfaces/state/composition/state-surface/state-surface'\nimport { Switch } from '@tc96/ui/switch'\nimport { Text } from '@tc96/ui/text'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '
|
|
27
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
26
|
+
"content": "import { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { StateSurface } from '@tc96/ui/patterns/surfaces/state/composition/state-surface/state-surface'\nimport { Switch } from '@tc96/ui/switch'\nimport { Text } from '@tc96/ui/text'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '../../shared/settings-load-state'\nimport { SettingsSelect } from '../../shared/settings-select'\nimport { defaultSettingsRolePermission1Labels } from './labels'\nimport { SettingsRolePermission1Skeleton } from './settings-role-permission-1-skeleton'\nimport type { SettingsRolePermission1Props } from './types'\n\nexport function SettingsRolePermission1({\n error,\n onRetry,\n pending,\n capabilities,\n className,\n labels: labelsProp,\n onCapabilityChange,\n onRoleChange,\n roles,\n selectedRole,\n}: Readonly<SettingsRolePermission1Props>) {\n const labels = { ...defaultSettingsRolePermission1Labels, ...labelsProp }\n const loadState = settingsLoadState({\n error,\n labels,\n onRetry,\n pending,\n skeleton: <SettingsRolePermission1Skeleton />,\n })\n\n return (\n <SettingsSection\n className={cn('mx-auto w-full max-w-3xl', className)}\n header={\n <SettingsSectionHeader\n actions={\n <SettingsSelect\n ariaLabel={labels.role}\n items={roles}\n onValueChange={onRoleChange}\n value={selectedRole}\n />\n }\n >\n <SettingsSectionTitle>{labels.title}</SettingsSectionTitle>\n <SettingsSectionDescription>\n {labels.description}\n </SettingsSectionDescription>\n </SettingsSectionHeader>\n }\n >\n {loadState ??\n (capabilities.length === 0 ? (\n <StateSurface\n description={labels.emptyDescription}\n kind=\"empty\"\n title={labels.emptyTitle}\n />\n ) : (\n <ul className=\"grid grid-cols-1 gap-3 py-4 sm:grid-cols-2\">\n {capabilities.map((capability) => (\n <li\n className=\"flex items-start justify-between gap-3 rounded-lg border p-4\"\n key={capability.id}\n >\n <div className=\"min-w-0\">\n <Text\n render={<p>{capability.title}</p>}\n size=\"sm\"\n weight=\"semibold\"\n />\n <Text\n foreground=\"muted\"\n render={<p>{capability.description}</p>}\n size=\"sm\"\n />\n </div>\n <Switch\n aria-label={capability.title}\n checked={capability.checked}\n onCheckedChange={(next) =>\n onCapabilityChange?.(capability.id, next)\n }\n />\n </li>\n ))}\n </ul>\n ))}\n </SettingsSection>\n )\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/blocks/application/settings/role-permission/settings-role-permission-1/settings-role-permission-1.tsx"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "blocks/application/settings/settings-
|
|
30
|
+
"path": "blocks/application/settings/role-permission/settings-role-permission-1/types.ts",
|
|
31
31
|
"type": "registry:file",
|
|
32
|
-
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '
|
|
33
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
32
|
+
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '../../shared/types'\nexport interface SettingsRolePermission1Capability {\n checked: boolean\n description: string\n id: string\n title: string\n}\n\nexport interface SettingsRolePermission1Role {\n label: string\n value: string\n}\n\nexport interface SettingsRolePermission1Labels extends SettingsLoadLabels {\n description: string\n emptyDescription: string\n emptyTitle: string\n role: string\n title: string\n}\n\nexport interface SettingsRolePermission1Props extends SettingsLoadProps {\n capabilities: SettingsRolePermission1Capability[]\n className?: string\n labels?: Partial<SettingsRolePermission1Labels>\n onCapabilityChange?: (capabilityId: string, checked: boolean) => void\n onRoleChange?: (role: string) => void\n roles: SettingsRolePermission1Role[]\n selectedRole: string\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/blocks/application/settings/role-permission/settings-role-permission-1/types.ts"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "blocks/application/settings/shared/labels.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{
|
|
60
60
|
"path": "blocks/application/settings/shared/types.ts",
|
|
61
61
|
"type": "registry:file",
|
|
62
|
-
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n",
|
|
62
|
+
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n\nexport interface SettingsAppLogoData {\n svg: string\n title?: string\n}\n",
|
|
63
63
|
"target": "~/packages/ui/src/blocks/application/settings/shared/types.ts"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "settings-
|
|
2
|
+
"name": "settings-security-1",
|
|
3
3
|
"type": "registry:block",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "blocks/application/settings/settings-
|
|
6
|
+
"path": "blocks/application/settings/security/settings-security-1/index.ts",
|
|
7
7
|
"type": "registry:file",
|
|
8
|
-
"content": "export {
|
|
9
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
8
|
+
"content": "export { SettingsSecurity1 } from './settings-security-1'\nexport type {\n SettingsSecurity1Control,\n SettingsSecurity1Labels,\n SettingsSecurity1Plan,\n SettingsSecurity1Props,\n} from './types'\n",
|
|
9
|
+
"target": "~/packages/ui/src/blocks/application/settings/security/settings-security-1/index.ts"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"path": "blocks/application/settings/settings-
|
|
12
|
+
"path": "blocks/application/settings/security/settings-security-1/labels.ts",
|
|
13
13
|
"type": "registry:file",
|
|
14
|
-
"content": "import { defaultSettingsLoadLabels } from '
|
|
15
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
14
|
+
"content": "import { defaultSettingsLoadLabels } from '../../shared/labels'\nimport type { SettingsSecurity1Labels } from './types'\n\nexport const defaultSettingsSecurity1Labels: SettingsSecurity1Labels = {\n ...defaultSettingsLoadLabels,\n errorTitle: 'Não foi possível carregar a privacidade',\n loading: 'Carregando privacidade',\n beta: 'Beta',\n description: 'Decida o que é coletado e compartilhado sobre sua conta.',\n pro: 'Pro',\n title: 'Privacidade',\n}\n",
|
|
15
|
+
"target": "~/packages/ui/src/blocks/application/settings/security/settings-security-1/labels.ts"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "blocks/application/settings/settings-
|
|
18
|
+
"path": "blocks/application/settings/security/settings-security-1/settings-security-1-skeleton.tsx",
|
|
19
19
|
"type": "registry:file",
|
|
20
|
-
"content": "import { SettingsRowsSkeleton } from '
|
|
21
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
20
|
+
"content": "import { SettingsRowsSkeleton } from '../../shared/settings-skeleton'\n\nexport function SettingsSecurity1Skeleton() {\n return <SettingsRowsSkeleton count={4} end=\"switch\" />\n}\n",
|
|
21
|
+
"target": "~/packages/ui/src/blocks/application/settings/security/settings-security-1/settings-security-1-skeleton.tsx"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "blocks/application/settings/settings-
|
|
24
|
+
"path": "blocks/application/settings/security/settings-security-1/settings-security-1.tsx",
|
|
25
25
|
"type": "registry:file",
|
|
26
|
-
"content": "import { Badge } from '@tc96/ui/badge'\nimport { Button } from '@tc96/ui/button'\nimport { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { Switch } from '@tc96/ui/switch'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '
|
|
27
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
26
|
+
"content": "import { Badge } from '@tc96/ui/badge'\nimport { Button } from '@tc96/ui/button'\nimport { SettingsRow } from '@tc96/ui/patterns/surfaces/settings/composition/settings-row/settings-row'\nimport { SettingsSection } from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section'\nimport {\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@tc96/ui/patterns/surfaces/settings/composition/settings-section/settings-section-header'\nimport { Switch } from '@tc96/ui/switch'\nimport { cn } from '@tc96/utils'\nimport { settingsLoadState } from '../../shared/settings-load-state'\nimport { defaultSettingsSecurity1Labels } from './labels'\nimport { SettingsSecurity1Skeleton } from './settings-security-1-skeleton'\nimport type {\n SettingsSecurity1Control,\n SettingsSecurity1Labels,\n SettingsSecurity1Props,\n} from './types'\n\ninterface ControlRowProps {\n control: SettingsSecurity1Control\n labels: SettingsSecurity1Labels\n onAction?: SettingsSecurity1Props['onAction']\n onCheckedChange?: SettingsSecurity1Props['onCheckedChange']\n}\n\nfunction ControlRow({\n control,\n labels,\n onAction,\n onCheckedChange,\n}: Readonly<ControlRowProps>) {\n const isAction = control.actionLabel !== undefined\n\n return (\n <SettingsRow\n description={control.description}\n endSlot={\n <div className=\"flex items-center gap-3\">\n {control.plan ? (\n <Badge variant={control.plan === 'pro' ? 'info' : 'warning'}>\n {labels[control.plan]}\n </Badge>\n ) : null}\n {isAction ? (\n onAction ? (\n <Button\n onClick={() => onAction(control.id)}\n size=\"sm\"\n variant=\"outline\"\n >\n {control.actionLabel}\n </Button>\n ) : null\n ) : (\n <Switch\n aria-label={control.title}\n checked={control.checked ?? false}\n onCheckedChange={(next) => onCheckedChange?.(control.id, next)}\n />\n )}\n </div>\n }\n title={control.title}\n />\n )\n}\n\nexport function SettingsSecurity1({\n error,\n onRetry,\n pending,\n className,\n controls,\n labels: labelsProp,\n onAction,\n onCheckedChange,\n}: Readonly<SettingsSecurity1Props>) {\n const labels = { ...defaultSettingsSecurity1Labels, ...labelsProp }\n const loadState = settingsLoadState({\n error,\n labels,\n onRetry,\n pending,\n skeleton: <SettingsSecurity1Skeleton />,\n })\n\n return (\n <SettingsSection\n className={cn('mx-auto w-full max-w-2xl', className)}\n header={\n <SettingsSectionHeader>\n <SettingsSectionTitle>{labels.title}</SettingsSectionTitle>\n <SettingsSectionDescription>\n {labels.description}\n </SettingsSectionDescription>\n </SettingsSectionHeader>\n }\n >\n {loadState ??\n controls.map((control) => (\n <ControlRow\n control={control}\n key={control.id}\n labels={labels}\n onAction={onAction}\n onCheckedChange={onCheckedChange}\n />\n ))}\n </SettingsSection>\n )\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/blocks/application/settings/security/settings-security-1/settings-security-1.tsx"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "blocks/application/settings/settings-
|
|
30
|
+
"path": "blocks/application/settings/security/settings-security-1/types.ts",
|
|
31
31
|
"type": "registry:file",
|
|
32
|
-
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '
|
|
33
|
-
"target": "~/packages/ui/src/blocks/application/settings/settings-
|
|
32
|
+
"content": "import type { SettingsLoadLabels, SettingsLoadProps } from '../../shared/types'\nexport type SettingsSecurity1Plan = 'pro' | 'beta'\n\nexport interface SettingsSecurity1Control {\n actionLabel?: string\n checked?: boolean\n description: string\n id: string\n plan?: SettingsSecurity1Plan\n title: string\n}\n\nexport interface SettingsSecurity1Labels extends SettingsLoadLabels {\n beta: string\n description: string\n pro: string\n title: string\n}\n\nexport interface SettingsSecurity1Props extends SettingsLoadProps {\n className?: string\n controls: SettingsSecurity1Control[]\n labels?: Partial<SettingsSecurity1Labels>\n onAction?: (controlId: string) => void\n onCheckedChange?: (controlId: string, checked: boolean) => void\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/blocks/application/settings/security/settings-security-1/types.ts"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "blocks/application/settings/shared/labels.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
{
|
|
54
54
|
"path": "blocks/application/settings/shared/types.ts",
|
|
55
55
|
"type": "registry:file",
|
|
56
|
-
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n",
|
|
56
|
+
"content": "export interface SettingsRowAction {\n destructive?: boolean\n id: string\n label: string\n}\n\nexport interface SettingsOption {\n label: string\n value: string\n}\n\nexport interface SettingsLoadLabels {\n errorDescription: string\n errorTitle: string\n loading: string\n retry: string\n}\n\nexport interface SettingsLoadProps {\n error?: boolean\n onRetry?: () => void\n pending?: boolean\n}\n\nexport interface SettingsAppLogoData {\n svg: string\n title?: string\n}\n",
|
|
57
57
|
"target": "~/packages/ui/src/blocks/application/settings/shared/types.ts"
|
|
58
58
|
},
|
|
59
59
|
{
|