origam 2.8.0 โ†’ 2.9.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.
Files changed (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -0
  3. package/dist/src/assets/css/main.css +1 -1
  4. package/dist/src/assets/css/tokens/dark.css +32 -0
  5. package/dist/src/assets/css/tokens/light.css +16 -0
  6. package/dist/src/assets/scss/tokens/_dark.scss +16 -0
  7. package/dist/src/assets/scss/tokens/_light.scss +16 -0
  8. package/dist/src/components/Alert/OrigamAlert.vue +4 -2
  9. package/dist/src/components/Avatar/OrigamAvatarGroup.vue +31 -12
  10. package/dist/src/components/Btn/OrigamBtn.vue +11 -2
  11. package/dist/src/components/Btn/OrigamBtnGroup.vue +204 -22
  12. package/dist/src/components/Btn/OrigamBtnToggle.vue +5 -1
  13. package/dist/src/components/Card/OrigamCard.vue +5 -2
  14. package/dist/src/components/Checkbox/OrigamCheckbox.vue +3 -1
  15. package/dist/src/components/Chip/OrigamChip.vue +2 -0
  16. package/dist/src/components/Code/OrigamCode.vue +4 -2
  17. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +19 -2
  18. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +3 -2
  19. package/dist/src/components/Dialog/OrigamDialog.vue +1 -1
  20. package/dist/src/components/Field/OrigamField.vue +7 -0
  21. package/dist/src/components/Layout/OrigamLayout.vue +10 -1
  22. package/dist/src/components/Menu/OrigamMenu.vue +3 -1
  23. package/dist/src/components/NumberField/OrigamNumberField.vue +3 -2
  24. package/dist/src/components/Overlay/OrigamOverlayScrim.vue +2 -0
  25. package/dist/src/components/Radio/OrigamRadio.vue +3 -1
  26. package/dist/src/components/Select/OrigamSelect.vue +3 -1
  27. package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +2 -0
  28. package/dist/src/components/SliderField/OrigamSliderField.vue +3 -1
  29. package/dist/src/components/Snackbar/OrigamSnackbar.vue +3 -1
  30. package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +2 -0
  31. package/dist/src/components/Switch/OrigamSwitch.vue +42 -1
  32. package/dist/src/components/Switch/OrigamSwitchTrack.vue +35 -2
  33. package/dist/src/components/Table/OrigamTable.vue +4 -2
  34. package/dist/src/components/Tabs/OrigamTabs.vue +3 -1
  35. package/dist/src/components/Tooltip/OrigamTooltip.vue +2 -0
  36. package/dist/src/composables/Commons/defaults.composable.cjs +10 -6
  37. package/dist/src/composables/Commons/defaults.composable.d.ts +30 -0
  38. package/dist/src/composables/Commons/defaults.composable.js +9 -6
  39. package/dist/src/composables/Theme/theme.composable.cjs +49 -30
  40. package/dist/src/composables/Theme/theme.composable.js +41 -22
  41. package/dist/src/interfaces/App/app.interface.d.ts +1 -1
  42. package/dist/src/interfaces/Btn/btn-group.interface.d.ts +2 -2
  43. package/dist/src/interfaces/Switch/switch-track.interface.d.ts +23 -6
  44. package/dist/src/themes/origam.theme.cjs +2 -4
  45. package/dist/src/themes/origam.theme.js +2 -2
  46. package/dist/src/types/tokens.type.d.ts +1 -1
  47. package/dist/src/utils/Commons/commons.util.cjs +10 -0
  48. package/dist/src/utils/Commons/commons.util.d.ts +18 -0
  49. package/dist/src/utils/Commons/commons.util.js +9 -0
  50. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Prioul Arnaud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # origam
2
+
3
+ A Vue 3 design system with multi-theme design tokens, CSS-first components
4
+ and TypeScript types.
5
+
6
+ > ๐Ÿ“– **Full documentation & interactive theme builder:**
7
+ > [https://origam.dev](https://origam.dev) *(coming soon)* ยท
8
+ > [GitHub repository](https://github.com/arnaudprioul/origam)
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install origam # or: pnpm add origam, or: yarn add origam
14
+ ```
15
+
16
+ | Peer dependency | Required | Used by |
17
+ |-----------------|----------|-------------------------------|
18
+ | `vue` | `^3.5` | Always. |
19
+ | `vue-i18n` | optional | Locale composable. |
20
+ | `vue-router` | optional | Link components. |
21
+ | `shiki` | optional | `OrigamCode` syntax highlight.|
22
+
23
+ ## Quick start
24
+
25
+ ```ts
26
+ // main.ts
27
+ import { createApp } from 'vue'
28
+ import { createOrigam } from 'origam'
29
+
30
+ import 'origam/tokens/css/primitive'
31
+ import 'origam/tokens/css/light'
32
+ import 'origam/tokens/css/utilities'
33
+
34
+ import App from './App.vue'
35
+
36
+ const origam = createOrigam()
37
+
38
+ createApp(App).use(origam).mount('#app')
39
+ ```
40
+
41
+ ```vue
42
+ <template>
43
+ <origam-btn color="primary" text="Save" />
44
+ </template>
45
+ ```
46
+
47
+ ### Nuxt
48
+
49
+ The package ships an official Nuxt module:
50
+
51
+ ```ts
52
+ // nuxt.config.ts
53
+ export default defineNuxtConfig({
54
+ modules: ['origam/nuxt']
55
+ })
56
+ ```
57
+
58
+ ## Theming
59
+
60
+ - **Multi-theme, two axes** โ€” `data-theme` (brand) ร— `data-mode`
61
+ (light/dark), driven by design tokens (`primitive โ†’ semantic โ†’
62
+ component` tiers). `prefers-color-scheme` is honoured in auto mode.
63
+ - **Props-first** โ€” a theme is an object configuring **component props
64
+ first** (variant, rounded, density, elevation, โ€ฆ), then semantic
65
+ tokens; raw CSS vars are the last resort.
66
+ - **CSS-first components** โ€” modern CSS (`grid`, `:has()`, container
67
+ queries, `color-mix()`) before JavaScript, with feature-detection
68
+ fallbacks.
69
+
70
+ Token stylesheets are exposed as dedicated entries: `origam/styles`
71
+ (full aggregate), `origam/tokens/css/*` and `origam/tokens/scss/*`
72
+ (granular), plus typed sub-exports (`origam/components`,
73
+ `origam/composables`, `origam/enums`, `origam/types`, โ€ฆ).
74
+
75
+ ## Links
76
+
77
+ - [Documentation & theme builder](https://origam.dev) *(coming soon)*
78
+ - [Changelog](https://github.com/arnaudprioul/origam/blob/main/CHANGELOG.md)
79
+ - [Issues](https://github.com/arnaudprioul/origam/issues)
80
+
81
+ ## License
82
+
83
+ [MIT](https://github.com/arnaudprioul/origam/blob/main/LICENSE) ยฉ Prioul Arnaud