@pixel-point/toolcraft 0.0.2
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/LICENSE.md +98 -0
- package/README.md +41 -0
- package/bin/create-toolcraft-app.mjs +8 -0
- package/bin/toolcraft.mjs +8 -0
- package/package.json +24 -0
- package/scripts/prepare-pack.mjs +29 -0
- package/src/cli.mjs +392 -0
- package/src/cli.test.mjs +284 -0
- package/src/copy-recursive.mjs +86 -0
- package/src/generate.mjs +212 -0
- package/src/generate.test.mjs +322 -0
- package/src/import-map.mjs +14 -0
- package/src/package-json.mjs +80 -0
- package/src/package-json.test.mjs +67 -0
- package/src/rewrite-imports.mjs +85 -0
- package/src/rewrite-imports.test.mjs +58 -0
- package/templates/runtime/contracts/component-contracts.test.ts +1165 -0
- package/templates/runtime/contracts/component-contracts.ts +1340 -0
- package/templates/runtime/contracts/decision-contracts.test.ts +206 -0
- package/templates/runtime/contracts/decision-contracts.ts +283 -0
- package/templates/runtime/contracts/index.test.ts +14 -0
- package/templates/runtime/contracts/index.ts +3 -0
- package/templates/runtime/contracts/types.ts +56 -0
- package/templates/runtime/export/export.test.ts +203 -0
- package/templates/runtime/export/export.ts +132 -0
- package/templates/runtime/export/index.ts +1 -0
- package/templates/runtime/index.ts +14 -0
- package/templates/runtime/react/canvas-shell.test.tsx +424 -0
- package/templates/runtime/react/canvas-shell.tsx +408 -0
- package/templates/runtime/react/control-renderers.ts +31 -0
- package/templates/runtime/react/controls-panel.test.tsx +3736 -0
- package/templates/runtime/react/controls-panel.tsx +2327 -0
- package/templates/runtime/react/curve-geometry.test.ts +70 -0
- package/templates/runtime/react/index.ts +15 -0
- package/templates/runtime/react/layer-tree.ts +96 -0
- package/templates/runtime/react/layers-panel.test.tsx +487 -0
- package/templates/runtime/react/layers-panel.tsx +1348 -0
- package/templates/runtime/react/media-file.ts +82 -0
- package/templates/runtime/react/panel-host-config.ts +80 -0
- package/templates/runtime/react/panel-host-geometry.test.ts +66 -0
- package/templates/runtime/react/panel-host-geometry.ts +109 -0
- package/templates/runtime/react/panel-host-types.ts +74 -0
- package/templates/runtime/react/panel-host.test.tsx +102 -0
- package/templates/runtime/react/panel-host.tsx +353 -0
- package/templates/runtime/react/runtime-public-api.test.tsx +132 -0
- package/templates/runtime/react/settings-transfer.test.ts +150 -0
- package/templates/runtime/react/settings-transfer.ts +279 -0
- package/templates/runtime/react/storage-key-migration.ts +48 -0
- package/templates/runtime/react/theme-runtime.tsx +177 -0
- package/templates/runtime/react/timeline-panel.test.tsx +668 -0
- package/templates/runtime/react/timeline-panel.tsx +2953 -0
- package/templates/runtime/react/toolbar-panel.test.tsx +212 -0
- package/templates/runtime/react/toolbar-panel.tsx +205 -0
- package/templates/runtime/react/toolcraft-app.integration.test.tsx +350 -0
- package/templates/runtime/react/toolcraft-app.test.tsx +339 -0
- package/templates/runtime/react/toolcraft-app.tsx +81 -0
- package/templates/runtime/react/toolcraft-root.test.tsx +347 -0
- package/templates/runtime/react/toolcraft-root.tsx +203 -0
- package/templates/runtime/react/use-toolcraft.ts +41 -0
- package/templates/runtime/schema/define-toolcraft.test.ts +1524 -0
- package/templates/runtime/schema/define-toolcraft.ts +1442 -0
- package/templates/runtime/schema/keyframe-capability.test.ts +90 -0
- package/templates/runtime/schema/keyframe-capability.ts +51 -0
- package/templates/runtime/schema/runtime-targets.ts +40 -0
- package/templates/runtime/schema/types.ts +370 -0
- package/templates/runtime/state/canvas-zoom.ts +8 -0
- package/templates/runtime/state/create-template-state.test.ts +242 -0
- package/templates/runtime/state/create-template-state.ts +95 -0
- package/templates/runtime/state/keyframe-evaluation.test.ts +141 -0
- package/templates/runtime/state/keyframe-evaluation.ts +203 -0
- package/templates/runtime/state/persistence.test.ts +217 -0
- package/templates/runtime/state/persistence.ts +511 -0
- package/templates/runtime/state/reducer.test.ts +937 -0
- package/templates/runtime/state/reducer.ts +1212 -0
- package/templates/runtime/state/timeline-readiness.ts +43 -0
- package/templates/runtime/state/types.ts +242 -0
- package/templates/runtime/styles.css +125 -0
- package/templates/runtime/testing/performance.test.ts +1058 -0
- package/templates/runtime/testing/performance.ts +1078 -0
- package/templates/starter/AGENTS.md +186 -0
- package/templates/starter/LICENSE.md +98 -0
- package/templates/starter/NOTICE.md +8 -0
- package/templates/starter/docs/toolcraft/README.md +41 -0
- package/templates/starter/docs/toolcraft/acceptance-testing.md +205 -0
- package/templates/starter/docs/toolcraft/agent-worklog.md +81 -0
- package/templates/starter/docs/toolcraft/assembly-workflow.md +206 -0
- package/templates/starter/docs/toolcraft/component-rules.md +299 -0
- package/templates/starter/docs/toolcraft/custom-controls.md +71 -0
- package/templates/starter/docs/toolcraft/decision-contract.md +71 -0
- package/templates/starter/docs/toolcraft/performance.md +112 -0
- package/templates/starter/docs/toolcraft/renderer-technique.md +48 -0
- package/templates/starter/docs/toolcraft/schema-reference.md +265 -0
- package/templates/starter/docs/toolcraft/workflow.md +87 -0
- package/templates/starter/e2e/app-browser-acceptance.spec.ts +785 -0
- package/templates/starter/e2e/app-controls.spec.ts +41 -0
- package/templates/starter/e2e/app-performance.spec.ts +326 -0
- package/templates/starter/e2e/canvas-handle-helpers.ts +244 -0
- package/templates/starter/e2e/performance-helpers.ts +612 -0
- package/templates/starter/e2e/product-observable-helpers.ts +170 -0
- package/templates/starter/index.html +12 -0
- package/templates/starter/package.json +52 -0
- package/templates/starter/playwright.config.ts +43 -0
- package/templates/starter/scripts/check-ai-skills.mjs +95 -0
- package/templates/starter/scripts/check-toolcraft-docs.mjs +159 -0
- package/templates/starter/scripts/check-toolcraft-integrity.mjs +232 -0
- package/templates/starter/scripts/run-vite-on-free-port.mjs +48 -0
- package/templates/starter/scripts/toolcraft-port.mjs +54 -0
- package/templates/starter/scripts/toolcraft-port.test.mjs +73 -0
- package/templates/starter/src/app/starter-acceptance.test.ts +5959 -0
- package/templates/starter/src/app/starter-acceptance.ts +2646 -0
- package/templates/starter/src/app/starter-performance.test.ts +1390 -0
- package/templates/starter/src/app/starter-performance.ts +12 -0
- package/templates/starter/src/app/starter-schema.test.ts +70 -0
- package/templates/starter/src/app/starter-schema.ts +15 -0
- package/templates/starter/src/main.tsx +18 -0
- package/templates/starter/src/router.tsx +16 -0
- package/templates/starter/src/routes/index.tsx +7 -0
- package/templates/starter/src/routes/root.tsx +19 -0
- package/templates/starter/src/styles.css +120 -0
- package/templates/starter/tsconfig.json +11 -0
- package/templates/starter/vite.config.ts +13 -0
- package/templates/ui/components/composites/accordion.tsx +73 -0
- package/templates/ui/components/composites/alert-dialog.tsx +190 -0
- package/templates/ui/components/composites/alert.tsx +74 -0
- package/templates/ui/components/composites/aspect-ratio.tsx +22 -0
- package/templates/ui/components/composites/avatar.tsx +98 -0
- package/templates/ui/components/composites/badge.tsx +69 -0
- package/templates/ui/components/composites/breadcrumb.tsx +106 -0
- package/templates/ui/components/composites/card.tsx +91 -0
- package/templates/ui/components/composites/combobox.tsx +486 -0
- package/templates/ui/components/composites/command.tsx +296 -0
- package/templates/ui/components/composites/context-menu.tsx +247 -0
- package/templates/ui/components/composites/dialog.tsx +282 -0
- package/templates/ui/components/composites/dropdown-menu.tsx +299 -0
- package/templates/ui/components/composites/empty.tsx +110 -0
- package/templates/ui/components/composites/hover-card.tsx +44 -0
- package/templates/ui/components/composites/index.ts +30 -0
- package/templates/ui/components/composites/menubar.tsx +214 -0
- package/templates/ui/components/composites/navigation-menu.tsx +167 -0
- package/templates/ui/components/composites/pagination.tsx +131 -0
- package/templates/ui/components/composites/progress.tsx +72 -0
- package/templates/ui/components/composites/radio-group.tsx +84 -0
- package/templates/ui/components/composites/resizable.tsx +42 -0
- package/templates/ui/components/composites/sheet.tsx +153 -0
- package/templates/ui/components/composites/sidebar-structural.tsx +310 -0
- package/templates/ui/components/composites/sidebar.tsx +431 -0
- package/templates/ui/components/composites/sonner.tsx +35 -0
- package/templates/ui/components/composites/spinner.tsx +43 -0
- package/templates/ui/components/composites/table.tsx +108 -0
- package/templates/ui/components/composites/tabs.tsx +83 -0
- package/templates/ui/components/control-layout/index.tsx +437 -0
- package/templates/ui/components/controls/actions/actions-control.tsx +139 -0
- package/templates/ui/components/controls/actions/index.ts +9 -0
- package/templates/ui/components/controls/anchor-grid/anchor-grid-control.tsx +107 -0
- package/templates/ui/components/controls/anchor-grid/index.ts +4 -0
- package/templates/ui/components/controls/boolean/boolean-controls.tsx +79 -0
- package/templates/ui/components/controls/boolean/index.ts +4 -0
- package/templates/ui/components/controls/channel-mixer/channel-mixer-control.tsx +95 -0
- package/templates/ui/components/controls/channel-mixer/index.ts +4 -0
- package/templates/ui/components/controls/channel-tabs/channel-tabs.tsx +42 -0
- package/templates/ui/components/controls/channel-tabs/index.ts +6 -0
- package/templates/ui/components/controls/code-textarea/code-textarea-control.tsx +90 -0
- package/templates/ui/components/controls/code-textarea/index.ts +4 -0
- package/templates/ui/components/controls/color/color-control.tsx +571 -0
- package/templates/ui/components/controls/color/color-picker-popover.tsx +104 -0
- package/templates/ui/components/controls/color/index.ts +41 -0
- package/templates/ui/components/controls/color/palette-control-data.ts +436 -0
- package/templates/ui/components/controls/color/palette-control.tsx +535 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-channel-utils.ts +162 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-interactions.ts +190 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-logic.ts +485 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-parts.tsx +710 -0
- package/templates/ui/components/controls/color/style-guide-color-picker.tsx +503 -0
- package/templates/ui/components/controls/control-types.ts +43 -0
- package/templates/ui/components/controls/curves/curve-geometry.ts +355 -0
- package/templates/ui/components/controls/curves/curve-graph.tsx +390 -0
- package/templates/ui/components/controls/curves/curves-control.tsx +445 -0
- package/templates/ui/components/controls/curves/index.ts +6 -0
- package/templates/ui/components/controls/file-drop/file-drop-control.tsx +191 -0
- package/templates/ui/components/controls/file-drop/index.ts +5 -0
- package/templates/ui/components/controls/font-picker/font-catalog.json +15360 -0
- package/templates/ui/components/controls/font-picker/font-catalog.ts +116 -0
- package/templates/ui/components/controls/font-picker/font-picker-control.tsx +1202 -0
- package/templates/ui/components/controls/font-picker/font-preview-loader.ts +336 -0
- package/templates/ui/components/controls/font-picker/index.ts +24 -0
- package/templates/ui/components/controls/font-picker/use-hover-intent.ts +46 -0
- package/templates/ui/components/controls/gradient/gradient-control-utils.ts +190 -0
- package/templates/ui/components/controls/gradient/gradient-control.tsx +612 -0
- package/templates/ui/components/controls/gradient/gradient-stop-list.tsx +400 -0
- package/templates/ui/components/controls/gradient/gradient-toolbar.tsx +152 -0
- package/templates/ui/components/controls/gradient/index.ts +4 -0
- package/templates/ui/components/controls/image-picker/image-picker-control.tsx +139 -0
- package/templates/ui/components/controls/image-picker/index.ts +7 -0
- package/templates/ui/components/controls/index.ts +192 -0
- package/templates/ui/components/controls/range-input/index.ts +4 -0
- package/templates/ui/components/controls/range-input/range-input-control.tsx +173 -0
- package/templates/ui/components/controls/range-slider/index.ts +4 -0
- package/templates/ui/components/controls/range-slider/range-slider-control.tsx +122 -0
- package/templates/ui/components/controls/range-slider/range-slider-value.ts +61 -0
- package/templates/ui/components/controls/segmented/index.ts +8 -0
- package/templates/ui/components/controls/segmented/segmented-control.tsx +94 -0
- package/templates/ui/components/controls/select/index.ts +4 -0
- package/templates/ui/components/controls/select/select-control.tsx +223 -0
- package/templates/ui/components/controls/slider/index.ts +4 -0
- package/templates/ui/components/controls/slider/slider-control.tsx +150 -0
- package/templates/ui/components/controls/slider/slider-value.ts +56 -0
- package/templates/ui/components/controls/text-input/index.ts +4 -0
- package/templates/ui/components/controls/text-input/text-input-control.tsx +158 -0
- package/templates/ui/components/controls/use-measured-element-width.ts +42 -0
- package/templates/ui/components/controls/vector/index.ts +8 -0
- package/templates/ui/components/controls/vector/vector-control.tsx +401 -0
- package/templates/ui/components/panel/index.ts +19 -0
- package/templates/ui/components/panel/panel-actions.tsx +165 -0
- package/templates/ui/components/panel/panel-header.tsx +61 -0
- package/templates/ui/components/panel/panel-icon-button.tsx +96 -0
- package/templates/ui/components/panel/panel-section.tsx +168 -0
- package/templates/ui/components/panel/panel-surface.tsx +206 -0
- package/templates/ui/components/panel/panel.tsx +210 -0
- package/templates/ui/components/primitives/animated-loader.tsx +61 -0
- package/templates/ui/components/primitives/button-group.tsx +134 -0
- package/templates/ui/components/primitives/button.tsx +429 -0
- package/templates/ui/components/primitives/checkbox.tsx +62 -0
- package/templates/ui/components/primitives/editable-slider-value-label.tsx +337 -0
- package/templates/ui/components/primitives/field.tsx +225 -0
- package/templates/ui/components/primitives/index.ts +82 -0
- package/templates/ui/components/primitives/input-group.tsx +298 -0
- package/templates/ui/components/primitives/input.tsx +61 -0
- package/templates/ui/components/primitives/internal/button-loading.tsx +178 -0
- package/templates/ui/components/primitives/label.tsx +16 -0
- package/templates/ui/components/primitives/popover.tsx +126 -0
- package/templates/ui/components/primitives/portal-layer-context.tsx +33 -0
- package/templates/ui/components/primitives/primitive-arrow-icon.tsx +38 -0
- package/templates/ui/components/primitives/scroll-fade-logic.ts +441 -0
- package/templates/ui/components/primitives/scroll-fade-render.tsx +75 -0
- package/templates/ui/components/primitives/scroll-fade-types.ts +41 -0
- package/templates/ui/components/primitives/scroll-fade.tsx +72 -0
- package/templates/ui/components/primitives/select.tsx +408 -0
- package/templates/ui/components/primitives/selection-state.ts +31 -0
- package/templates/ui/components/primitives/separator.tsx +21 -0
- package/templates/ui/components/primitives/slider/index.ts +4 -0
- package/templates/ui/components/primitives/slider/slider-interaction.tsx +96 -0
- package/templates/ui/components/primitives/slider/slider-parts.tsx +303 -0
- package/templates/ui/components/primitives/slider/slider-reset.ts +152 -0
- package/templates/ui/components/primitives/slider/slider-value.ts +114 -0
- package/templates/ui/components/primitives/slider/slider.tsx +511 -0
- package/templates/ui/components/primitives/switch.tsx +35 -0
- package/templates/ui/components/primitives/textarea.tsx +49 -0
- package/templates/ui/components/primitives/toggle-group.tsx +114 -0
- package/templates/ui/components/primitives/toggle.tsx +46 -0
- package/templates/ui/components/primitives/tooltip.tsx +100 -0
- package/templates/ui/hooks/use-mobile.ts +21 -0
- package/templates/ui/index.ts +31 -0
- package/templates/ui/lib/control-outline.ts +3 -0
- package/templates/ui/lib/input-control-style.ts +131 -0
- package/templates/ui/lib/style-guide-color-utils.ts +111 -0
- package/templates/ui/lib/utils.ts +6 -0
- package/templates/ui/styles.css +291 -0
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
export const PALETTE_SHADE_STEPS = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"] as const;
|
|
2
|
+
|
|
3
|
+
export type PaletteShadeStep = (typeof PALETTE_SHADE_STEPS)[number];
|
|
4
|
+
|
|
5
|
+
export const TAILWIND_COLOR_PALETTE = [
|
|
6
|
+
{
|
|
7
|
+
name: "Red",
|
|
8
|
+
shades: {
|
|
9
|
+
"50": "#fef2f2",
|
|
10
|
+
"100": "#fee2e2",
|
|
11
|
+
"200": "#fecaca",
|
|
12
|
+
"300": "#fca5a5",
|
|
13
|
+
"400": "#f87171",
|
|
14
|
+
"500": "#ef4444",
|
|
15
|
+
"600": "#dc2626",
|
|
16
|
+
"700": "#b91c1c",
|
|
17
|
+
"800": "#991b1b",
|
|
18
|
+
"900": "#7f1d1d",
|
|
19
|
+
"950": "#450a0a",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "Orange",
|
|
24
|
+
shades: {
|
|
25
|
+
"50": "#fff7ed",
|
|
26
|
+
"100": "#ffedd5",
|
|
27
|
+
"200": "#fed7aa",
|
|
28
|
+
"300": "#fdba74",
|
|
29
|
+
"400": "#fb923c",
|
|
30
|
+
"500": "#f97316",
|
|
31
|
+
"600": "#ea580c",
|
|
32
|
+
"700": "#c2410c",
|
|
33
|
+
"800": "#9a3412",
|
|
34
|
+
"900": "#7c2d12",
|
|
35
|
+
"950": "#431407",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "Amber",
|
|
40
|
+
shades: {
|
|
41
|
+
"50": "#fffbeb",
|
|
42
|
+
"100": "#fef3c7",
|
|
43
|
+
"200": "#fde68a",
|
|
44
|
+
"300": "#fcd34d",
|
|
45
|
+
"400": "#fbbf24",
|
|
46
|
+
"500": "#f59e0b",
|
|
47
|
+
"600": "#d97706",
|
|
48
|
+
"700": "#b45309",
|
|
49
|
+
"800": "#92400e",
|
|
50
|
+
"900": "#78350f",
|
|
51
|
+
"950": "#451a03",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Yellow",
|
|
56
|
+
shades: {
|
|
57
|
+
"50": "#fefce8",
|
|
58
|
+
"100": "#fef9c3",
|
|
59
|
+
"200": "#fef08a",
|
|
60
|
+
"300": "#fde047",
|
|
61
|
+
"400": "#facc15",
|
|
62
|
+
"500": "#eab308",
|
|
63
|
+
"600": "#ca8a04",
|
|
64
|
+
"700": "#a16207",
|
|
65
|
+
"800": "#854d0e",
|
|
66
|
+
"900": "#713f12",
|
|
67
|
+
"950": "#422006",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "Lime",
|
|
72
|
+
shades: {
|
|
73
|
+
"50": "#f7fee7",
|
|
74
|
+
"100": "#ecfccb",
|
|
75
|
+
"200": "#d9f99d",
|
|
76
|
+
"300": "#bef264",
|
|
77
|
+
"400": "#a3e635",
|
|
78
|
+
"500": "#84cc16",
|
|
79
|
+
"600": "#65a30d",
|
|
80
|
+
"700": "#4d7c0f",
|
|
81
|
+
"800": "#3f6212",
|
|
82
|
+
"900": "#365314",
|
|
83
|
+
"950": "#1a2e05",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "Green",
|
|
88
|
+
shades: {
|
|
89
|
+
"50": "#f0fdf4",
|
|
90
|
+
"100": "#dcfce7",
|
|
91
|
+
"200": "#bbf7d0",
|
|
92
|
+
"300": "#86efac",
|
|
93
|
+
"400": "#4ade80",
|
|
94
|
+
"500": "#22c55e",
|
|
95
|
+
"600": "#16a34a",
|
|
96
|
+
"700": "#15803d",
|
|
97
|
+
"800": "#166534",
|
|
98
|
+
"900": "#14532d",
|
|
99
|
+
"950": "#052e16",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "Emerald",
|
|
104
|
+
shades: {
|
|
105
|
+
"50": "#ecfdf5",
|
|
106
|
+
"100": "#d1fae5",
|
|
107
|
+
"200": "#a7f3d0",
|
|
108
|
+
"300": "#6ee7b7",
|
|
109
|
+
"400": "#34d399",
|
|
110
|
+
"500": "#10b981",
|
|
111
|
+
"600": "#059669",
|
|
112
|
+
"700": "#047857",
|
|
113
|
+
"800": "#065f46",
|
|
114
|
+
"900": "#064e3b",
|
|
115
|
+
"950": "#022c22",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "Teal",
|
|
120
|
+
shades: {
|
|
121
|
+
"50": "#f0fdfa",
|
|
122
|
+
"100": "#ccfbf1",
|
|
123
|
+
"200": "#99f6e4",
|
|
124
|
+
"300": "#5eead4",
|
|
125
|
+
"400": "#2dd4bf",
|
|
126
|
+
"500": "#14b8a6",
|
|
127
|
+
"600": "#0d9488",
|
|
128
|
+
"700": "#0f766e",
|
|
129
|
+
"800": "#115e59",
|
|
130
|
+
"900": "#134e4a",
|
|
131
|
+
"950": "#042f2e",
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "Cyan",
|
|
136
|
+
shades: {
|
|
137
|
+
"50": "#ecfeff",
|
|
138
|
+
"100": "#cffafe",
|
|
139
|
+
"200": "#a5f3fc",
|
|
140
|
+
"300": "#67e8f9",
|
|
141
|
+
"400": "#22d3ee",
|
|
142
|
+
"500": "#06b6d4",
|
|
143
|
+
"600": "#0891b2",
|
|
144
|
+
"700": "#0e7490",
|
|
145
|
+
"800": "#155e75",
|
|
146
|
+
"900": "#164e63",
|
|
147
|
+
"950": "#083344",
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "Sky",
|
|
152
|
+
shades: {
|
|
153
|
+
"50": "#f0f9ff",
|
|
154
|
+
"100": "#e0f2fe",
|
|
155
|
+
"200": "#bae6fd",
|
|
156
|
+
"300": "#7dd3fc",
|
|
157
|
+
"400": "#38bdf8",
|
|
158
|
+
"500": "#0ea5e9",
|
|
159
|
+
"600": "#0284c7",
|
|
160
|
+
"700": "#0369a1",
|
|
161
|
+
"800": "#075985",
|
|
162
|
+
"900": "#0c4a6e",
|
|
163
|
+
"950": "#082f49",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "Blue",
|
|
168
|
+
shades: {
|
|
169
|
+
"50": "#eff6ff",
|
|
170
|
+
"100": "#dbeafe",
|
|
171
|
+
"200": "#bfdbfe",
|
|
172
|
+
"300": "#93c5fd",
|
|
173
|
+
"400": "#60a5fa",
|
|
174
|
+
"500": "#3b82f6",
|
|
175
|
+
"600": "#2563eb",
|
|
176
|
+
"700": "#1d4ed8",
|
|
177
|
+
"800": "#1e40af",
|
|
178
|
+
"900": "#1e3a8a",
|
|
179
|
+
"950": "#172554",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "Indigo",
|
|
184
|
+
shades: {
|
|
185
|
+
"50": "#eef2ff",
|
|
186
|
+
"100": "#e0e7ff",
|
|
187
|
+
"200": "#c7d2fe",
|
|
188
|
+
"300": "#a5b4fc",
|
|
189
|
+
"400": "#818cf8",
|
|
190
|
+
"500": "#6366f1",
|
|
191
|
+
"600": "#4f46e5",
|
|
192
|
+
"700": "#4338ca",
|
|
193
|
+
"800": "#3730a3",
|
|
194
|
+
"900": "#312e81",
|
|
195
|
+
"950": "#1e1b4b",
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "Violet",
|
|
200
|
+
shades: {
|
|
201
|
+
"50": "#f5f3ff",
|
|
202
|
+
"100": "#ede9fe",
|
|
203
|
+
"200": "#ddd6fe",
|
|
204
|
+
"300": "#c4b5fd",
|
|
205
|
+
"400": "#a78bfa",
|
|
206
|
+
"500": "#8b5cf6",
|
|
207
|
+
"600": "#7c3aed",
|
|
208
|
+
"700": "#6d28d9",
|
|
209
|
+
"800": "#5b21b6",
|
|
210
|
+
"900": "#4c1d95",
|
|
211
|
+
"950": "#2e1065",
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "Purple",
|
|
216
|
+
shades: {
|
|
217
|
+
"50": "#faf5ff",
|
|
218
|
+
"100": "#f3e8ff",
|
|
219
|
+
"200": "#e9d5ff",
|
|
220
|
+
"300": "#d8b4fe",
|
|
221
|
+
"400": "#c084fc",
|
|
222
|
+
"500": "#a855f7",
|
|
223
|
+
"600": "#9333ea",
|
|
224
|
+
"700": "#7e22ce",
|
|
225
|
+
"800": "#6b21a8",
|
|
226
|
+
"900": "#581c87",
|
|
227
|
+
"950": "#3b0764",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: "Fuchsia",
|
|
232
|
+
shades: {
|
|
233
|
+
"50": "#fdf4ff",
|
|
234
|
+
"100": "#fae8ff",
|
|
235
|
+
"200": "#f5d0fe",
|
|
236
|
+
"300": "#f0abfc",
|
|
237
|
+
"400": "#e879f9",
|
|
238
|
+
"500": "#d946ef",
|
|
239
|
+
"600": "#c026d3",
|
|
240
|
+
"700": "#a21caf",
|
|
241
|
+
"800": "#86198f",
|
|
242
|
+
"900": "#701a75",
|
|
243
|
+
"950": "#4a044e",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: "Pink",
|
|
248
|
+
shades: {
|
|
249
|
+
"50": "#fdf2f8",
|
|
250
|
+
"100": "#fce7f3",
|
|
251
|
+
"200": "#fbcfe8",
|
|
252
|
+
"300": "#f9a8d4",
|
|
253
|
+
"400": "#f472b6",
|
|
254
|
+
"500": "#ec4899",
|
|
255
|
+
"600": "#db2777",
|
|
256
|
+
"700": "#be185d",
|
|
257
|
+
"800": "#9d174d",
|
|
258
|
+
"900": "#831843",
|
|
259
|
+
"950": "#500724",
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "Rose",
|
|
264
|
+
shades: {
|
|
265
|
+
"50": "#fff1f2",
|
|
266
|
+
"100": "#ffe4e6",
|
|
267
|
+
"200": "#fecdd3",
|
|
268
|
+
"300": "#fda4af",
|
|
269
|
+
"400": "#fb7185",
|
|
270
|
+
"500": "#f43f5e",
|
|
271
|
+
"600": "#e11d48",
|
|
272
|
+
"700": "#be123c",
|
|
273
|
+
"800": "#9f1239",
|
|
274
|
+
"900": "#881337",
|
|
275
|
+
"950": "#4c0519",
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: "Slate",
|
|
280
|
+
shades: {
|
|
281
|
+
"50": "#f8fafc",
|
|
282
|
+
"100": "#f1f5f9",
|
|
283
|
+
"200": "#e2e8f0",
|
|
284
|
+
"300": "#cbd5e1",
|
|
285
|
+
"400": "#94a3b8",
|
|
286
|
+
"500": "#64748b",
|
|
287
|
+
"600": "#475569",
|
|
288
|
+
"700": "#334155",
|
|
289
|
+
"800": "#1e293b",
|
|
290
|
+
"900": "#0f172a",
|
|
291
|
+
"950": "#020617",
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: "Gray",
|
|
296
|
+
shades: {
|
|
297
|
+
"50": "#f9fafb",
|
|
298
|
+
"100": "#f3f4f6",
|
|
299
|
+
"200": "#e5e7eb",
|
|
300
|
+
"300": "#d1d5db",
|
|
301
|
+
"400": "#9ca3af",
|
|
302
|
+
"500": "#6b7280",
|
|
303
|
+
"600": "#4b5563",
|
|
304
|
+
"700": "#374151",
|
|
305
|
+
"800": "#1f2937",
|
|
306
|
+
"900": "#111827",
|
|
307
|
+
"950": "#030712",
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: "Zinc",
|
|
312
|
+
shades: {
|
|
313
|
+
"50": "#fafafa",
|
|
314
|
+
"100": "#f4f4f5",
|
|
315
|
+
"200": "#e4e4e7",
|
|
316
|
+
"300": "#d4d4d8",
|
|
317
|
+
"400": "#a1a1aa",
|
|
318
|
+
"500": "#71717a",
|
|
319
|
+
"600": "#52525b",
|
|
320
|
+
"700": "#3f3f46",
|
|
321
|
+
"800": "#27272a",
|
|
322
|
+
"900": "#18181b",
|
|
323
|
+
"950": "#09090b",
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: "Neutral",
|
|
328
|
+
shades: {
|
|
329
|
+
"50": "#fafafa",
|
|
330
|
+
"100": "#f5f5f5",
|
|
331
|
+
"200": "#e5e5e5",
|
|
332
|
+
"300": "#d4d4d4",
|
|
333
|
+
"400": "#a3a3a3",
|
|
334
|
+
"500": "#737373",
|
|
335
|
+
"600": "#525252",
|
|
336
|
+
"700": "#404040",
|
|
337
|
+
"800": "#262626",
|
|
338
|
+
"900": "#171717",
|
|
339
|
+
"950": "#0a0a0a",
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: "Stone",
|
|
344
|
+
shades: {
|
|
345
|
+
"50": "#fafaf9",
|
|
346
|
+
"100": "#f5f5f4",
|
|
347
|
+
"200": "#e7e5e4",
|
|
348
|
+
"300": "#d6d3d1",
|
|
349
|
+
"400": "#a8a29e",
|
|
350
|
+
"500": "#78716c",
|
|
351
|
+
"600": "#57534e",
|
|
352
|
+
"700": "#44403c",
|
|
353
|
+
"800": "#292524",
|
|
354
|
+
"900": "#1c1917",
|
|
355
|
+
"950": "#0c0a09",
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: "Mauve",
|
|
360
|
+
shades: {
|
|
361
|
+
"50": "#f7f4f8",
|
|
362
|
+
"100": "#ece8ee",
|
|
363
|
+
"200": "#ddd5e0",
|
|
364
|
+
"300": "#c5b8ca",
|
|
365
|
+
"400": "#a796ae",
|
|
366
|
+
"500": "#8c7694",
|
|
367
|
+
"600": "#755f7d",
|
|
368
|
+
"700": "#614d67",
|
|
369
|
+
"800": "#514156",
|
|
370
|
+
"900": "#443847",
|
|
371
|
+
"950": "#2b232d",
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: "Olive",
|
|
376
|
+
shades: {
|
|
377
|
+
"50": "#f7f7f3",
|
|
378
|
+
"100": "#ebebe3",
|
|
379
|
+
"200": "#d8d9c9",
|
|
380
|
+
"300": "#bbbd9f",
|
|
381
|
+
"400": "#9ca07c",
|
|
382
|
+
"500": "#838662",
|
|
383
|
+
"600": "#686b4e",
|
|
384
|
+
"700": "#53563f",
|
|
385
|
+
"800": "#454734",
|
|
386
|
+
"900": "#3c3d2e",
|
|
387
|
+
"950": "#1e1f17",
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
name: "Mist",
|
|
392
|
+
shades: {
|
|
393
|
+
"50": "#f0f4f5",
|
|
394
|
+
"100": "#dde6e8",
|
|
395
|
+
"200": "#c3d3d6",
|
|
396
|
+
"300": "#9cb7bc",
|
|
397
|
+
"400": "#6d9198",
|
|
398
|
+
"500": "#4f7580",
|
|
399
|
+
"600": "#45646f",
|
|
400
|
+
"700": "#3d5560",
|
|
401
|
+
"800": "#384850",
|
|
402
|
+
"900": "#323f45",
|
|
403
|
+
"950": "#21292d",
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
name: "Taupe",
|
|
408
|
+
shades: {
|
|
409
|
+
"50": "#f6f3f2",
|
|
410
|
+
"100": "#ede7e5",
|
|
411
|
+
"200": "#ddd2ce",
|
|
412
|
+
"300": "#c7b6b0",
|
|
413
|
+
"400": "#ac958d",
|
|
414
|
+
"500": "#947d74",
|
|
415
|
+
"600": "#7f6a63",
|
|
416
|
+
"700": "#675752",
|
|
417
|
+
"800": "#574a46",
|
|
418
|
+
"900": "#4a403d",
|
|
419
|
+
"950": "#2b2422",
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
] as const;
|
|
423
|
+
|
|
424
|
+
export type PaletteColorFamily = (typeof TAILWIND_COLOR_PALETTE)[number]["name"];
|
|
425
|
+
|
|
426
|
+
export type PaletteControlValue = {
|
|
427
|
+
family: PaletteColorFamily;
|
|
428
|
+
shade: PaletteShadeStep;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
export const STYLE_GUIDE_PRIMARY_FAMILY_OPTIONS = TAILWIND_COLOR_PALETTE.slice(0, -1);
|
|
432
|
+
|
|
433
|
+
export function getPaletteHex(value: PaletteControlValue): string {
|
|
434
|
+
const palette = TAILWIND_COLOR_PALETTE.find((entry) => entry.name === value.family) ?? TAILWIND_COLOR_PALETTE[0];
|
|
435
|
+
return palette.shades[value.shade].toLowerCase();
|
|
436
|
+
}
|